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-length
6 Return abrupt completion getting newTarget's prototype
8 22.2.4.2 TypedArray ( length )
10 This description applies only if the TypedArray function is called with at
11 least one argument and the Type of the first argument is not Object.
14 8. Return ? AllocateTypedArray(constructorName, NewTarget,
15 %TypedArrayPrototype%, elementLength).
17 22.2.4.2.1 Runtime Semantics: AllocateTypedArray (constructorName, newTarget,
18 defaultProto [ , length ])
20 1. Let proto be ? GetPrototypeFromConstructor(newTarget, defaultProto).
23 9.1.15 GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )
26 3. Let proto be ? Get(constructor, "prototype").
28 includes: [testTypedArray.js]
29 features: [Reflect, TypedArray]
32 var newTarget = function() {}.bind(null);
33 Object.defineProperty(newTarget, "prototype", {
35 throw new Test262Error();
39 testWithTypedArrayConstructors(function(TA) {
40 assert.throws(Test262Error, function() {
41 Reflect.construct(TA, [1], newTarget);