Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7363b57 commit 81e74d8Copy full SHA for 81e74d8
1 file changed
javascript/ql/test/library-tests/TripleDot/useuse.js
@@ -0,0 +1,30 @@
1
+import 'dummy';
2
+
3
+function t1() {
4
+ const obj = {};
5
6
+ sink(obj.field); // $ SPURIOUS: hasValueFlow=t1.1 hasValueFlow=t1.2
7
8
+ obj.field = source('t1.1');
9
+ sink(obj.field); // $ hasValueFlow=t1.1 SPURIOUS: hasValueFlow=t1.2
10
11
+ obj.field = "safe";
12
13
14
+ obj.field = source('t1.2');
15
+ sink(obj.field); // $ hasValueFlow=t1.2 SPURIOUS: hasValueFlow=t1.1
16
+}
17
18
+function t2() {
19
+ let obj;
20
21
+ if (Math.random()) {
22
+ obj = {};
23
+ sink(obj.field);
24
+ } else {
25
26
+ obj.field = source('t2.1');
27
+ sink(obj.field); // $ hasValueFlow=t2.1
28
+ }
29
30
0 commit comments