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-array.prototype.concat
6 Behavior when the @@species attribute is a non-constructor object
8 1. Let O be ? ToObject(this value).
9 2. Let A be ? ArraySpeciesCreate(O, 0).
11 9.4.2.3 ArraySpeciesCreate
14 5. Let C be ? Get(originalArray, "constructor").
16 7. If Type(C) is Object, then
17 a. Let C be ? Get(C, @@species).
18 b. If C is null, let C be undefined.
20 9. If IsConstructor(C) is false, throw a TypeError exception.
21 includes: [isConstructor.js]
22 features: [Symbol.species, Reflect.construct]
26 isConstructor(parseInt),
28 'precondition: isConstructor(parseInt) must return false'
34 a.constructor[Symbol.species] = parseInt;
36 assert.throws(TypeError, function() {
38 }, 'a.concat() throws a TypeError exception');