63 lines
829 B
Text
63 lines
829 B
Text
=== tests/cases/compiler/sourceMapValidationSwitch.ts ===
|
|
var x = 10;
|
|
>x : number
|
|
>10 : number
|
|
|
|
switch (x) {
|
|
>x : number
|
|
|
|
case 5:
|
|
>5 : number
|
|
|
|
x++;
|
|
>x++ : number
|
|
>x : number
|
|
|
|
break;
|
|
case 10:
|
|
>10 : number
|
|
{
|
|
x--;
|
|
>x-- : number
|
|
>x : number
|
|
|
|
break;
|
|
}
|
|
default:
|
|
x = x *10;
|
|
>x = x *10 : number
|
|
>x : number
|
|
>x *10 : number
|
|
>x : number
|
|
>10 : number
|
|
}
|
|
switch (x)
|
|
>x : number
|
|
{
|
|
case 5:
|
|
>5 : number
|
|
|
|
x++;
|
|
>x++ : number
|
|
>x : number
|
|
|
|
break;
|
|
case 10:
|
|
>10 : number
|
|
{
|
|
x--;
|
|
>x-- : number
|
|
>x : number
|
|
|
|
break;
|
|
}
|
|
default:
|
|
{
|
|
x = x * 10;
|
|
>x = x * 10 : number
|
|
>x : number
|
|
>x * 10 : number
|
|
>x : number
|
|
>10 : number
|
|
}
|
|
}
|