blob: fdac743d4237cc7b0545db9314263895c35bce87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright (C) 2013 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
If the `this` value does not have all of the internal slots of an Array
Iterator Instance (22.1.5.3), throw a TypeError exception.
esid: sec-%arrayiteratorprototype%.next
features: [Symbol.iterator]
---*/
var array = [0];
var iterator = array[Symbol.iterator]();
var object = Object.create(iterator);
assert.throws(TypeError, function() {
object.next();
});
reportCompare(0, 0);
|