TypeScript/tests/cases/conformance/functions/parameterInitializersForwardReferencing.2.ts
Ron Buckton a7d6825e25
Fix temp vars referenced in parameter (#38130)
* Fix temp vars referenced in parameter

* Update error message
2020-04-23 20:45:39 -07:00

17 lines
291 B
TypeScript

// @target: es5, es2015, esnext
// @noEmit: true
// @noTypesAndSymbols: true
// https://github.com/microsoft/TypeScript/issues/36295
function a(): any {}
function b({ b = a(), ...x } = a()) {
var a;
}
const x = "";
function c({ b, ...c } = a(), d = x) {
var x;
}