JS: Add test showing missed call to later-defined function in block

This commit is contained in:
Asger F
2025-02-03 14:56:11 +01:00
parent e39ad940a7
commit 29879297ee
2 changed files with 26 additions and 0 deletions

View File

@@ -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 | () {} |

View File

@@ -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() {}
}
}