We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fcf4ef commit 3ea1134Copy full SHA for 3ea1134
javascript/ql/test/library-tests/TripleDot/arrays.js
@@ -0,0 +1,15 @@
1
+import 'dummy';
2
+
3
+function shiftKnown() {
4
+ let array = [source('shift.1'), source('shift.2')];
5
+ sink(array.shift()); // $ hasValueFlow=shift.1
6
+ sink(array.shift()); // $ SPURIOUS: hasValueFlow=shift.1 MISSING: hasValueFlow=shift.2
7
+}
8
9
+function shiftUnknown() {
10
+ const array = new Array(Math.floor(Math.random() * 10));
11
+ array.push(source('shift.unkn'));
12
+ sink(array.shift()); // $ hasValueFlow=shift.unkn
13
14
15
0 commit comments