mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
425 B
TypeScript
21 lines
425 B
TypeScript
//// [tests/cases/compiler/fatarrowfunctionsInFunctionParameterDefaults.ts] ////
|
|
|
|
//// [fatarrowfunctionsInFunctionParameterDefaults.ts]
|
|
function fn(x = () => this, y = x()) {
|
|
|
|
// should be 4
|
|
return y;
|
|
|
|
}
|
|
|
|
fn.call(4); // Should be 4
|
|
|
|
|
|
//// [fatarrowfunctionsInFunctionParameterDefaults.js]
|
|
"use strict";
|
|
function fn(x = () => this, y = x()) {
|
|
// should be 4
|
|
return y;
|
|
}
|
|
fn.call(4); // Should be 4
|