tests/auto/qml/ecmascripttests/test262/test/annexB/language/statements/for-in/let-initializer.js
raw| 1 | // Copyright (C) 2016 the V8 project authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | /*--- |
| 4 | esid: sec-initializers-in-forin-statement-heads |
| 5 | description: > |
| 6 | for-in initializers with let are prohibited |
| 7 | negative: |
| 8 | phase: parse |
| 9 | type: SyntaxError |
| 10 | ---*/ |
| 11 | |
| 12 | throw "Test262: This statement should not be evaluated."; |
| 13 | throw NotEarlyError; |
| 14 | for (let a = 0 in {}); |
| 15 |