Closed
Description
TypeScript Version: 2.0.2
Code
class MyBrand
{
private _a;
}
function test(strInput: string & MyBrand, numInput: number & MyBrand) {
switch(strInput)
{
case "a": // error: Type '"a"' is not comparable to type 'string & MyBrand'
return 1;
}
switch(numInput)
{
case 1: // error: Type '1' is not comparable to type 'number & MyBrand'
return 1;
}
return 0;
}
Expected behavior:
No error reported in case statements.
Actual behavior:
See above error report inline.