mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
//// [tests/cases/conformance/es6/arrowFunction/emitArrowFunctionWhenUsingArguments19_ES6.ts] ////
|
|
|
|
=== emitArrowFunctionWhenUsingArguments19_ES6.ts ===
|
|
function f() {
|
|
>f : Symbol(f, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 0, 0))
|
|
|
|
function g() {
|
|
>g : Symbol(g, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 0, 14))
|
|
|
|
var _arguments = 10; // No capture in 'g', so no conflict.
|
|
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 2, 11))
|
|
|
|
function h() {
|
|
>h : Symbol(h, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 2, 28))
|
|
|
|
var capture = () => arguments; // Should trigger an '_arguments' capture into function 'h'
|
|
>capture : Symbol(capture, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 4, 15))
|
|
>arguments : Symbol(arguments)
|
|
|
|
foo(_arguments); // Error as this does not resolve to the user defined '_arguments'
|
|
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 7, 5))
|
|
>_arguments : Symbol(_arguments, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 2, 11))
|
|
}
|
|
}
|
|
|
|
function foo(x: any) {
|
|
>foo : Symbol(foo, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 7, 5))
|
|
>x : Symbol(x, Decl(emitArrowFunctionWhenUsingArguments19_ES6.ts, 9, 17))
|
|
|
|
return 100;
|
|
}
|
|
}
|