mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
825 B
Plaintext
19 lines
825 B
Plaintext
//// [tests/cases/compiler/emitCapturingThisInTupleDestructuring1.ts] ////
|
|
|
|
=== emitCapturingThisInTupleDestructuring1.ts ===
|
|
declare function wrapper(x: any);
|
|
>wrapper : Symbol(wrapper, Decl(emitCapturingThisInTupleDestructuring1.ts, 0, 0))
|
|
>x : Symbol(x, Decl(emitCapturingThisInTupleDestructuring1.ts, 0, 25))
|
|
|
|
wrapper((array: [any]) => {
|
|
>wrapper : Symbol(wrapper, Decl(emitCapturingThisInTupleDestructuring1.ts, 0, 0))
|
|
>array : Symbol(array, Decl(emitCapturingThisInTupleDestructuring1.ts, 1, 9))
|
|
|
|
[this.test, this.test1, this.test2] = array; // even though there is a compiler error, we should still emit lexical capture for "this"
|
|
>this : Symbol(globalThis)
|
|
>this : Symbol(globalThis)
|
|
>this : Symbol(globalThis)
|
|
>array : Symbol(array, Decl(emitCapturingThisInTupleDestructuring1.ts, 1, 9))
|
|
|
|
});
|