blob: d4e76bf161cdb5b0a17ab3ac69d0102760743d70 [file] [log] [blame]
// author: Simon Zünd
Object.defineProperty(Object.prototype, '2', {
value: 'foo',
configurable: true,
enumerable: true,
writable: false,
});
const array = [undefined, 'c', /*hole*/, 'b', undefined, /*hole*/, 'a', 'd'];
shouldThrow('array.sort()', '"TypeError: Attempted to assign to readonly property."');