mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
JS: Add test for missing flow into 'this' in field initializers
This commit is contained in:
@@ -51,3 +51,14 @@ function t4() {
|
||||
const c = new C(source('t4.1'));
|
||||
sink(c.foo); // $ hasValueFlow=t4.1
|
||||
}
|
||||
|
||||
function t5() {
|
||||
class C {
|
||||
field = source('t5.1')
|
||||
constructor() {
|
||||
sink(this.field); // $ hasValueFlow=t5.1
|
||||
}
|
||||
}
|
||||
const c = new C();
|
||||
sink(c.field); // $ MISSING: hasValueFlow=t5.1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user