1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
|
=== tests/cases/compiler/capturedLetConstInLoop10.ts ===
class A {
>A : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0))
foo() {
>foo : Symbol(A.foo, Decl(capturedLetConstInLoop10.ts, 0, 9))
for (let x of [0]) {
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 2, 16))
let f = function() { return x; };
>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 3, 15))
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 2, 16))
this.bar(f());
>this.bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0))
>bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 3, 15))
}
}
bar(a: number) {
>bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 7, 8))
}
baz() {
>baz : Symbol(A.baz, Decl(capturedLetConstInLoop10.ts, 8, 5))
for (let x of [1]) {
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 11, 16))
let a = function() { return x; };
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 12, 15))
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 11, 16))
for (let y of [1]) {
>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 13, 20))
let b = function() { return y; };
>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 14, 19))
>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 13, 20))
this.bar(b());
>this.bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0))
>bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 14, 19))
}
this.bar(a());
>this.bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0))
>bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 12, 15))
}
}
baz2() {
>baz2 : Symbol(A.baz2, Decl(capturedLetConstInLoop10.ts, 19, 5))
for (let x of [1]) {
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 21, 16))
let a = function() { return x; };
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 22, 15))
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 21, 16))
this.bar(a());
>this.bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0))
>bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 22, 15))
for (let y of [1]) {
>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 24, 20))
let b = function() { return y; };
>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 25, 19))
>y : Symbol(y, Decl(capturedLetConstInLoop10.ts, 24, 20))
this.bar(b());
>this.bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>this : Symbol(A, Decl(capturedLetConstInLoop10.ts, 0, 0))
>bar : Symbol(A.bar, Decl(capturedLetConstInLoop10.ts, 6, 5))
>b : Symbol(b, Decl(capturedLetConstInLoop10.ts, 25, 19))
}
}
}
}
class B {
>B : Symbol(B, Decl(capturedLetConstInLoop10.ts, 30, 1))
foo() {
>foo : Symbol(B.foo, Decl(capturedLetConstInLoop10.ts, 32, 9))
let a =
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 34, 11))
() => {
for (let x of [0]) {
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 36, 24))
let f = () => x;
>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 37, 23))
>x : Symbol(x, Decl(capturedLetConstInLoop10.ts, 36, 24))
this.bar(f());
>this.bar : Symbol(B.bar, Decl(capturedLetConstInLoop10.ts, 41, 5))
>this : Symbol(B, Decl(capturedLetConstInLoop10.ts, 30, 1))
>bar : Symbol(B.bar, Decl(capturedLetConstInLoop10.ts, 41, 5))
>f : Symbol(f, Decl(capturedLetConstInLoop10.ts, 37, 23))
}
}
}
bar(a: number) {
>bar : Symbol(B.bar, Decl(capturedLetConstInLoop10.ts, 41, 5))
>a : Symbol(a, Decl(capturedLetConstInLoop10.ts, 42, 8))
}
}
|