mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Add test showing missed call to later-defined function in block
This commit is contained in:
@@ -2,6 +2,7 @@ spuriousCallee
|
||||
missingCallee
|
||||
| constructor-field.ts:40:5:40:14 | f3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
|
||||
| constructor-field.ts:71:1:71:11 | bf3.build() | constructor-field.ts:13:3:13:12 | build() {} | -1 | calls |
|
||||
| hoisted.js:20:9:20:11 | f() | hoisted.js:23:9:23:23 | function f() {} | -1 | calls |
|
||||
badAnnotation
|
||||
accessorCall
|
||||
| accessors.js:12:1:12:5 | obj.f | accessors.js:5:8:5:12 | () {} |
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
function test1() {
|
||||
/** name:hoist1 */
|
||||
function f() {}
|
||||
|
||||
/** calls:hoist1 */
|
||||
f();
|
||||
}
|
||||
|
||||
function test2() {
|
||||
/** calls:hoist2 */
|
||||
f();
|
||||
|
||||
/** name:hoist2 */
|
||||
function f() {}
|
||||
}
|
||||
|
||||
function test3() {
|
||||
{
|
||||
/** calls:hoist3 */
|
||||
f();
|
||||
|
||||
/** name:hoist3 */
|
||||
function f() {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user