File tree Expand file tree Collapse file tree
javascript/ql/test/library-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11legacyDataFlowDifference
2+ | arrays.js:2:16:2:23 | "source" | arrays.js:58:8:58:13 | arr[0] | only flow with NEW data flow library |
23flow
34| arrays.js:2:16:2:23 | "source" | arrays.js:5:8:5:14 | obj.foo |
45| arrays.js:2:16:2:23 | "source" | arrays.js:11:10:11:15 | arr[i] |
56| arrays.js:2:16:2:23 | "source" | arrays.js:15:27:15:27 | e |
67| arrays.js:2:16:2:23 | "source" | arrays.js:16:23:16:23 | e |
78| arrays.js:2:16:2:23 | "source" | arrays.js:20:8:20:16 | arr.pop() |
89| arrays.js:2:16:2:23 | "source" | arrays.js:39:8:39:24 | arr4_spread.pop() |
10+ | arrays.js:2:16:2:23 | "source" | arrays.js:58:8:58:13 | arr[0] |
911| arrays.js:2:16:2:23 | "source" | arrays.js:61:10:61:10 | x |
1012| arrays.js:2:16:2:23 | "source" | arrays.js:65:10:65:10 | x |
1113| arrays.js:2:16:2:23 | "source" | arrays.js:69:10:69:10 | x |
Original file line number Diff line number Diff line change 5555 sink ( ary ) ; // OK - its the array itself, not an element.
5656 } ) ;
5757
58- sink ( arr [ 0 ] ) ; // OK - tuple like usage.
58+ sink ( arr [ 0 ] ) ; // NOT OK
5959
6060 for ( const x of arr ) {
6161 sink ( x ) ; // NOT OK
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function m3() {
2828function m4 ( ) {
2929 const flowIntoArrayElement = mkSummary ( "Argument[0]" , "ReturnValue.ArrayElement" ) ;
3030 sink ( flowIntoArrayElement ( source ( ) ) . pop ( ) ) ; // NOT OK
31- sink ( flowIntoArrayElement ( source ( ) ) [ 0 ] ) ; // NOT OK [INCONSISTENCY]
31+ sink ( flowIntoArrayElement ( source ( ) ) [ 0 ] ) ; // NOT OK
3232 sink ( flowIntoArrayElement ( source ( ) ) [ Math . random ( ) ] ) ; // NOT OK
3333 sink ( flowIntoArrayElement ( source ( ) ) . prop ) ; // OK
3434}
You can’t perform that action at this time.
0 commit comments