summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/delete/11.4.1-5-a-27-s-strict.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/expressions/delete/11.4.1-5-a-27-s-strict.js')
-rw-r--r--js/src/tests/test262/language/expressions/delete/11.4.1-5-a-27-s-strict.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/delete/11.4.1-5-a-27-s-strict.js b/js/src/tests/test262/language/expressions/delete/11.4.1-5-a-27-s-strict.js
new file mode 100644
index 0000000000..c32710b2b6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/delete/11.4.1-5-a-27-s-strict.js
@@ -0,0 +1,25 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-delete-operator-runtime-semantics-evaluation
+description: >
+ Strict Mode - TypeError is thrown after deleting a property,
+ calling preventExtensions, and attempting to reassign the property
+flags: [onlyStrict]
+---*/
+
+var a = {
+ x: 0,
+ get y() {
+ return 0;
+ },
+};
+delete a.x;
+Object.preventExtensions(a);
+assert.throws(TypeError, function() {
+ a.x = 1;
+});
+
+reportCompare(0, 0);