Files
codeql/javascript/ql/test/library-tests/InterProceduralFlow/tst6.mjs
Max Schaefer 91a718cfe5 JavaScript: Fix data flow out of reflective calls.
We were previously missing a data-flow edge from reflected calls to the corresponding reflective call, that is, for `f.call(...)` we didn't have a flow edge from the implicit call to `f` to the result of `f.call(...)`.
2019-07-04 08:29:04 +01:00

19 lines
228 B
JavaScript

class A {
constructor(f) {
this._f = f;
}
m() {
return this._f;
}
}
var source = "source";
var a = new A(source);
var sink = a.m();
var source2 = "source2";
var a2 = new A(source2);
var sink2 = a.m.call(a2);