mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
JavaScript: Add a regression test for DeadStoreOfProperty.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
| exports.js:2:1:2:22 | exports ... = "yes" | This write to property 'answer' is useless, since $@ always overrides it. | exports.js:3:1:3:21 | exports ... = "no" | another property write |
|
||||
| fieldInit.ts:10:3:10:8 | f = 4; | This write to property 'f' is useless, since $@ always overrides it. | fieldInit.ts:13:5:13:14 | this.f = 5 | another property write |
|
||||
| real-world-examples.js:5:4:5:11 | o.p = 42 | This write to property 'p' is useless, since $@ always overrides it. | real-world-examples.js:10:2:10:9 | o.p = 42 | another property write |
|
||||
| real-world-examples.js:15:9:15:18 | o.p1 += 42 | This write to property 'p1' is useless, since $@ always overrides it. | real-world-examples.js:15:2:15:18 | o.p1 = o.p1 += 42 | another property write |
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
var exports = module.exports;
|
||||
exports.answer = "yes"; // NOT OK
|
||||
exports.answer = "no";
|
||||
Reference in New Issue
Block a user