Skip to content

Commit 8dc0505

Browse files
committed
JS: Add test for missing flow into 'this' in field initializers
1 parent c3c003b commit 8dc0505

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • javascript/ql/test/library-tests/TripleDot

javascript/ql/test/library-tests/TripleDot/useuse.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,14 @@ function t4() {
5151
const c = new C(source('t4.1'));
5252
sink(c.foo); // $ hasValueFlow=t4.1
5353
}
54+
55+
function t5() {
56+
class C {
57+
field = source('t5.1')
58+
constructor() {
59+
sink(this.field); // $ hasValueFlow=t5.1
60+
}
61+
}
62+
const c = new C();
63+
sink(c.field); // $ MISSING: hasValueFlow=t5.1
64+
}

0 commit comments

Comments
 (0)