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

10 lines
145 B
TypeScript
Raw Normal View History

let x: string | number | boolean;
let cond: boolean;
(x = "") && (x = 0);
x; // string | number
x = "";
cond && (x = 0);
x; // string | number