Debian Codegraph @

js/src/tests/test262/language/statements/for-of/head-expr-obj-iterator-method.js

raw
1 // Copyright (C) 2013 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 13.6.4.12 S8.b
5 description: >
6 The value of the expression in a for-of statement's head must have an
7 `@@iterator` method.
8 ---*/
9 var x;
10
11 assert.throws(TypeError, function() {
12 for (x of {}) {}
13 });
14
15 reportCompare(0, 0);