summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/for-in/head-const-bound-names-fordecl-tdz.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/statements/for-in/head-const-bound-names-fordecl-tdz.js')
-rw-r--r--js/src/tests/test262/language/statements/for-in/head-const-bound-names-fordecl-tdz.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/for-in/head-const-bound-names-fordecl-tdz.js b/js/src/tests/test262/language/statements/for-in/head-const-bound-names-fordecl-tdz.js
new file mode 100644
index 0000000000..c3b281209c
--- /dev/null
+++ b/js/src/tests/test262/language/statements/for-in/head-const-bound-names-fordecl-tdz.js
@@ -0,0 +1,14 @@
+// Copyright (C) 2014 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 13.6.4.12_S2
+description: >
+ ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of)
+---*/
+
+assert.throws(ReferenceError, function() {
+ let x = 1;
+ for (const x in { x }) {}
+});
+
+reportCompare(0, 0);