swc/crates/swc_ecma_parser/tests/tsc/controlFlowForOfStatement.ts

11 lines
179 B
TypeScript
Raw Normal View History

let obj: number[];
let x: string | number | boolean | RegExp;
function a() {
x = true;
for (x of obj) {
x = x.toExponential();
}
x; // string | boolean
}