mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
52 lines
1.9 KiB
Plaintext
52 lines
1.9 KiB
Plaintext
//// [tests/cases/compiler/capturedLetConstInLoop13.ts] ////
|
|
|
|
=== capturedLetConstInLoop13.ts ===
|
|
class Main {
|
|
>Main : Symbol(Main, Decl(capturedLetConstInLoop13.ts, 0, 0))
|
|
|
|
constructor() {
|
|
this.register("a", "b", "c");
|
|
>this.register : Symbol(Main.register, Decl(capturedLetConstInLoop13.ts, 4, 5))
|
|
>this : Symbol(Main, Decl(capturedLetConstInLoop13.ts, 0, 0))
|
|
>register : Symbol(Main.register, Decl(capturedLetConstInLoop13.ts, 4, 5))
|
|
}
|
|
|
|
private register(...names: string[]): void {
|
|
>register : Symbol(Main.register, Decl(capturedLetConstInLoop13.ts, 4, 5))
|
|
>names : Symbol(names, Decl(capturedLetConstInLoop13.ts, 6, 21))
|
|
|
|
for (let name of names) {
|
|
>name : Symbol(name, Decl(capturedLetConstInLoop13.ts, 7, 16))
|
|
>names : Symbol(names, Decl(capturedLetConstInLoop13.ts, 6, 21))
|
|
|
|
this.bar({
|
|
>this.bar : Symbol(Main.bar, Decl(capturedLetConstInLoop13.ts, 13, 5))
|
|
>this : Symbol(Main, Decl(capturedLetConstInLoop13.ts, 0, 0))
|
|
>bar : Symbol(Main.bar, Decl(capturedLetConstInLoop13.ts, 13, 5))
|
|
|
|
[name + ".a"]: () => { this.foo(name); },
|
|
>[name + ".a"] : Symbol([name + ".a"], Decl(capturedLetConstInLoop13.ts, 9, 22))
|
|
>name : Symbol(name, Decl(capturedLetConstInLoop13.ts, 7, 16))
|
|
>this.foo : Symbol(Main.foo, Decl(capturedLetConstInLoop13.ts, 15, 33))
|
|
>this : Symbol(Main, Decl(capturedLetConstInLoop13.ts, 0, 0))
|
|
>foo : Symbol(Main.foo, Decl(capturedLetConstInLoop13.ts, 15, 33))
|
|
>name : Symbol(name, Decl(capturedLetConstInLoop13.ts, 7, 16))
|
|
|
|
});
|
|
}
|
|
}
|
|
|
|
private bar(a: any): void { }
|
|
>bar : Symbol(Main.bar, Decl(capturedLetConstInLoop13.ts, 13, 5))
|
|
>a : Symbol(a, Decl(capturedLetConstInLoop13.ts, 15, 16))
|
|
|
|
private foo(name: string): void { }
|
|
>foo : Symbol(Main.foo, Decl(capturedLetConstInLoop13.ts, 15, 33))
|
|
>name : Symbol(name, Decl(capturedLetConstInLoop13.ts, 17, 16))
|
|
|
|
}
|
|
|
|
new Main();
|
|
>Main : Symbol(Main, Decl(capturedLetConstInLoop13.ts, 0, 0))
|
|
|