blob: 5b126cae35ebd720c7ac608f0c967dea74c32108 [file] [log] [blame]
function test1() {
var c = "it didn't work";
({ a: { b: { c = "it worked" } } } = { a: { b: {} } });
return c === "it worked";
}
function test2() {
var c = "it didn't work";
[{ a: { b: { c = "it worked" } } }] = [{ a: { b: {} } }];
return c === "it worked";
}
if (!test1())
throw new Error("Test1 failed");
if (!test2())
throw new Error("Test2 failed");