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

21 lines
319 B
TypeScript
Raw Normal View History

// @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;
}
}
}
}