Index: test/mjsunit/harmony/destructuring.js |
diff --git a/test/mjsunit/harmony/destructuring.js b/test/mjsunit/harmony/destructuring.js |
index c57dbafda6dbbd90862b11bd6af10e986e7bc2eb..198d4c025702c6de674bc66edfb8b5b8e82c848c 100644 |
--- a/test/mjsunit/harmony/destructuring.js |
+++ b/test/mjsunit/harmony/destructuring.js |
@@ -728,3 +728,11 @@ |
assertThrows("function f({x}) { var x; }; f({});", SyntaxError); |
assertThrows("'use strict'; function f({x}) { let x = 0; }; f({});", SyntaxError); |
}()); |
+ |
+ |
+(function TestForInOfTDZ() { |
+ assertThrows("'use strict'; let x = {}; for (let [x, y] of {x});", ReferenceError); |
+ assertThrows("'use strict'; let x = {}; for (let [y, x] of {x});", ReferenceError); |
+ assertThrows("'use strict'; let x = {}; for (let [x, y] in {x});", ReferenceError); |
+ assertThrows("'use strict'; let x = {}; for (let [y, x] in {x});", ReferenceError); |
+}()); |