mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
122 lines
4.2 KiB
Plaintext
122 lines
4.2 KiB
Plaintext
//// [tests/cases/compiler/capturedLetConstInLoop10.ts] ////
|
|
|
|
=== 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))
|
|
}
|
|
}
|