Closed
Description
TypeScript Version: 3.0.0-dev.201xxxxx
Search Terms:
Switch, non-comparable types, false negative
Code
declare let message: number | "hello"
switch (message) {
case "hi":
break
}
Expected behavior:
Type '"hi"' is not comparable to type 'number | "hello"'.
(2678)
Actual behavior:
No error.
Related Issues: None that I found