ChakraCore icon indicating copy to clipboard operation
ChakraCore copied to clipboard

Destructuring assignment target should obey const semantics

Open abchatra opened this issue 10 years ago • 2 comments

The assignment target should obey const semantics.

Test262 bug es6id: 12.14.5.4 features: [const]

const c = 1;

assert.throws(TypeError, function() {

({ a: c } = { a: 2 });

});

abchatra avatar Jan 30 '16 01:01 abchatra

We throw ReferenceError here.

akroshg avatar Jan 30 '16 01:01 akroshg

Closing this as it is similar to #355

akroshg avatar Feb 26 '16 00:02 akroshg