Chromium Code Reviews| 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); |
|
arv (Not doing code reviews)
2015/06/29 14:48:43
What is the motivation for repeating the test?
adamk
2015/06/29 18:20:13
To ensure that we're giving all the bound names TD
|
| + assertThrows("'use strict'; let x = {}; for (let [x, y] in {x});", ReferenceError); |
| + assertThrows("'use strict'; let x = {}; for (let [y, x] in {x});", ReferenceError); |
| +}()); |