Files
tsgo/testdata/baselines/reference/compiler/panicForInEmptyDeclarationList.symbols
cbd157804e Fix panic in getForInVariableSymbol for empty for-in declaration list (#2860)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: DanielRosenwasser <[email protected]>
2026-02-20 23:41:57 +00:00

24 lines
676 B
Plaintext

//// [tests/cases/compiler/panicForInEmptyDeclarationList.ts] ////
=== panicForInEmptyDeclarationList.ts ===
let x: string[] = [];
>x : Symbol(x, Decl(panicForInEmptyDeclarationList.ts, 0, 3))
let i = 0;
>i : Symbol(i, Decl(panicForInEmptyDeclarationList.ts, 1, 3))
function f() {
>f : Symbol(f, Decl(panicForInEmptyDeclarationList.ts, 1, 10))
for (let in) {
let y = x[i];
>y : Symbol(y, Decl(panicForInEmptyDeclarationList.ts, 5, 7))
>x : Symbol(x, Decl(panicForInEmptyDeclarationList.ts, 0, 3))
>i : Symbol(i, Decl(panicForInEmptyDeclarationList.ts, 1, 3))
return y;
>y : Symbol(y, Decl(panicForInEmptyDeclarationList.ts, 5, 7))
}
}