mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
The test ensures that flow summarization won't label property `f` of the first parameter of `assertNotNull` as a sink, which would be very imprecise.
10 lines
383 B
JavaScript
10 lines
383 B
JavaScript
exports.assertNotNull = function (x) {
|
|
if (x === null)
|
|
throw new TypeError();
|
|
}
|
|
|
|
exports.foo = function(x) {
|
|
exports.assertNotNull(x);
|
|
sink(x.f); /* !use (member f (parameter 0 (member assertNotNull (member exports (module property-read-from-argument))))) */ /* use (member f (parameter 0 (member foo (member exports (module property-read-from-argument))))) */
|
|
}
|