You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having a singleton type type A = "a" | "b", a variable const a: A = "a", and an expression a === "c", the compiler should infer the type of "c" as A and make the expression unsound.
Currently (1.8.0 and 1.9.0-dev.20160206) it compiles, which makes usage of singleton types instead of enums less type safe.
The text was updated successfully, but these errors were encountered:
Having a singleton type
type A = "a" | "b"
, a variableconst a: A = "a"
, and an expressiona === "c"
, the compiler should infer the type of"c"
asA
and make the expression unsound.Currently (1.8.0 and 1.9.0-dev.20160206) it compiles, which makes usage of singleton types instead of enums less type safe.
The text was updated successfully, but these errors were encountered: