Closed 0xe closed 1 month ago
Default values for destructuring assignments weren't transformed correctly. Partially addresses #1641.
For example, all of these expressions with default values were not being evaluated correctly:
function a() { return 12;}; function b([x = a()] = []) { return x }; b() function a() { return 12;}; function b([x = a()] = [1]) { return x }; b() function a() { return 12;}; function b([x = 1] = [a()]) { return x }; b() var a = { p1: { p2: 121}}; function b([x = a.p1.p2] = []) { return x }; b()
function a() { return 12;}; function b({x = a()} = {}) { return x }; b() function a() { return 12;}; function b({x = a()} = {x: 1}) { return x }; b() var a = { p1: { p2: 121}}; function b({x = a.p1.p2} = {}) { return x }; b() function a() { return 12;}; function b({x = 1} = {x: a()}) { return x }; b()
the number of fixed tests is really impressive.good job.
This is great -- thanks!
Default values for destructuring assignments weren't transformed correctly. Partially addresses #1641.
For example, all of these expressions with default values were not being evaluated correctly: