Files
tsgo/testdata/baselines/reference/compiler/panicForInEmptyDeclarationList.js
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

25 lines
392 B
TypeScript

//// [tests/cases/compiler/panicForInEmptyDeclarationList.ts] ////
//// [panicForInEmptyDeclarationList.ts]
let x: string[] = [];
let i = 0;
function f() {
for (let in) {
let y = x[i];
return y;
}
}
//// [panicForInEmptyDeclarationList.js]
"use strict";
let x = [];
let i = 0;
function f() {
for (let in ) {
let y = x[i];
return y;
}
}