Mauro Bringolf 92fc26d399 Remove check-constants plugin (#6987)
* Rebased onto new version

* Moved constants check into a separate method
2018-01-26 10:43:09 -05:00

15 lines
249 B
JavaScript

assert.throws(function() {
const [a, b] = [1, 2];
a = 3;
}, '"a" is read-only')
assert.throws(function() {
const a = 1;
[a] = [2];
}, '"a" is read-only');
assert.throws(function() {
const b = 1;
({b} = {b: 2});
}, '"b" is read-only');