TypeScript/tests/cases/conformance/controlFlow/controlFlowBinaryAndExpression.ts
2016-03-25 21:29:58 +01:00

10 lines
145 B
TypeScript

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