Closed
Description
TypeScript Version: 3.9.1-rc, 4.0.0-dev.20200428
Search Terms: cannot reference identifier
Code
function test0({ a = 0, b = a } = {}) {
return { a, b };
}
function test1({ c: { a = 0, b = a } = {} } = {}) {
return { a, b };
}
Expected behavior: Doesn't fail
Actual behavior: Fails with Parameter '{ a = 0, b = a }' cannot reference identifier 'a' declared after it.(2373)
Related Issues: #38130