Closed
Description
Applying two mutually exclusive guard constraints doesn't lead to 'never' type in the following case:
function ololo() {
let stringOrNumber: string | number = 3 > 5 ? "a" : 7;
if (typeof stringOrNumber === "number") {
if (typeof stringOrNumber !== "number") {
stringOrNumber; // shouldn't this be 'never'?
}
}
Seems that it should.