swc/crates/swc_ecma_parser/tests/tsc/controlFlowIteration.ts
2022-02-04 17:08:38 +09:00

21 lines
319 B
TypeScript

// @strictNullChecks: true
let cond: boolean;
function ff() {
let x: string | undefined;
while (true) {
if (cond) {
x = "";
}
else {
if (x) {
x.length;
}
if (x) {
x.length;
}
}
}
}