19 lines
777 B
Plaintext
19 lines
777 B
Plaintext
=== tests/cases/compiler/fatarrowfunctionsInFunctionParameterDefaults.ts ===
|
|
function fn(x = () => this, y = x()) {
|
|
>fn : Symbol(fn, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 0))
|
|
>x : Symbol(x, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 12))
|
|
>y : Symbol(y, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 27))
|
|
>x : Symbol(x, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 12))
|
|
|
|
// should be 4
|
|
return y;
|
|
>y : Symbol(y, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 27))
|
|
|
|
}
|
|
|
|
fn.call(4); // Should be 4
|
|
>fn.call : Symbol(Function.call, Decl(lib.d.ts, 234, 45))
|
|
>fn : Symbol(fn, Decl(fatarrowfunctionsInFunctionParameterDefaults.ts, 0, 0))
|
|
>call : Symbol(Function.call, Decl(lib.d.ts, 234, 45))
|
|
|