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.
4 esid: sec-%typedarray%.from
5 description: Returns error produced by invoking @@iterator
7 22.2.2.1 %TypedArray%.from ( source [ , mapfn [ , thisArg ] ] )
10 6. Let arrayLike be ? IterableToArrayLike(source).
13 22.2.2.1.1 Runtime Semantics: IterableToArrayLike( items )
15 1. Let usingIterator be ? GetMethod(items, @@iterator).
16 2. If usingIterator is not undefined, then
17 a. Let iterator be ? GetIterator(items, usingIterator).
19 includes: [testTypedArray.js]
20 features: [Symbol.iterator, TypedArray]
24 iter[Symbol.iterator] = function() {
25 throw new Test262Error();
28 assert.throws(Test262Error, function() {
29 TypedArray.from(iter);