139 lines
1.8 KiB
Plaintext
139 lines
1.8 KiB
Plaintext
|
=== tests/cases/compiler/cf.ts ===
|
||
|
function f() {
|
||
|
>f : () => void
|
||
|
|
||
|
var z;
|
||
|
>z : any
|
||
|
|
||
|
var x=10;
|
||
|
>x : number
|
||
|
|
||
|
var y=3;
|
||
|
>y : number
|
||
|
|
||
|
L1: for (var i=0;i<19;i++) {
|
||
|
>i : number
|
||
|
>i<19 : boolean
|
||
|
>i : number
|
||
|
>i++ : number
|
||
|
>i : number
|
||
|
|
||
|
if (y==7) {
|
||
|
>y==7 : boolean
|
||
|
>y : number
|
||
|
|
||
|
continue L1;
|
||
|
x=11;
|
||
|
>x=11 : number
|
||
|
>x : number
|
||
|
}
|
||
|
if (y==3) {
|
||
|
>y==3 : boolean
|
||
|
>y : number
|
||
|
|
||
|
y++;
|
||
|
>y++ : number
|
||
|
>y : number
|
||
|
}
|
||
|
else {
|
||
|
y--;
|
||
|
>y-- : number
|
||
|
>y : number
|
||
|
}
|
||
|
do {
|
||
|
y+=2;
|
||
|
>y+=2 : number
|
||
|
>y : number
|
||
|
|
||
|
if (y==20) {
|
||
|
>y==20 : boolean
|
||
|
>y : number
|
||
|
|
||
|
break;
|
||
|
x=12;
|
||
|
>x=12 : number
|
||
|
>x : number
|
||
|
}
|
||
|
} while (y<41);
|
||
|
>y<41 : boolean
|
||
|
>y : number
|
||
|
|
||
|
y++;
|
||
|
>y++ : number
|
||
|
>y : number
|
||
|
}
|
||
|
while (y>2) {
|
||
|
>y>2 : boolean
|
||
|
>y : number
|
||
|
|
||
|
y=y>>1;
|
||
|
>y=y>>1 : number
|
||
|
>y : number
|
||
|
>y>>1 : number
|
||
|
>y : number
|
||
|
}
|
||
|
L2: try {
|
||
|
L3: if (x<y) {
|
||
|
>x<y : boolean
|
||
|
>x : number
|
||
|
>y : number
|
||
|
|
||
|
break L2;
|
||
|
x=13;
|
||
|
>x=13 : number
|
||
|
>x : number
|
||
|
}
|
||
|
else {
|
||
|
break L3;
|
||
|
x=14;
|
||
|
>x=14 : number
|
||
|
>x : number
|
||
|
}
|
||
|
}
|
||
|
catch (e) {
|
||
|
>e : any
|
||
|
|
||
|
x++;
|
||
|
>x++ : number
|
||
|
>x : number
|
||
|
}
|
||
|
finally {
|
||
|
x+=3;
|
||
|
>x+=3 : number
|
||
|
>x : number
|
||
|
}
|
||
|
y++;
|
||
|
>y++ : number
|
||
|
>y : number
|
||
|
|
||
|
for (var k=0;k<10;k++) {
|
||
|
>k : number
|
||
|
>k<10 : boolean
|
||
|
>k : number
|
||
|
>k++ : number
|
||
|
>k : number
|
||
|
|
||
|
z;
|
||
|
>z : any
|
||
|
|
||
|
break;
|
||
|
}
|
||
|
for (k=0;k<10;k++) {
|
||
|
>k=0 : number
|
||
|
>k : number
|
||
|
>k<10 : boolean
|
||
|
>k : number
|
||
|
>k++ : number
|
||
|
>k : number
|
||
|
|
||
|
if (k==6) {
|
||
|
>k==6 : boolean
|
||
|
>k : number
|
||
|
|
||
|
continue;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|