| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
es5id: 11.4.1-5-a-27-s |
| 6 |
description: > |
| 7 |
Strict Mode - TypeError is thrown after deleting a property, |
| 8 |
calling preventExtensions, and attempting to reassign the property |
| 9 |
flags: [onlyStrict] |
| 10 |
---*/ |
| 11 |
|
| 12 |
var a = {x:0, get y() { return 0;}}; |
| 13 |
delete a.x; |
| 14 |
Object.preventExtensions(a); |
| 15 |
assert.throws(TypeError, function() { |
| 16 |
a.x = 1; |
| 17 |
}); |