TypeScript Version: 2.0.2
Code
classMyBrand{private_a;}functiontest(strInput: string&MyBrand,numInput: number&MyBrand){switch(strInput){case"a": // error: Type '"a"' is not comparable to type 'string & MyBrand'return1;}switch(numInput){case1: // error: Type '1' is not comparable to type 'number & MyBrand'return1;}return0;}Expected behavior:
No error reported in case statements.
Actual behavior:
See above error report inline.
TypeScript Version: 2.0.2
Code
Expected behavior:
No error reported in case statements.
Actual behavior:
See above error report inline.