TypeScript/tests/cases/conformance/controlFlow/controlFlowForOfStatement.ts
2016-03-25 17:03:12 -07:00

11 lines
179 B
TypeScript

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