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-integer-indexed-exotic-objects-hasproperty-p
6 Return true for indexed properties
8 9.4.5.2 [[HasProperty]](P)
11 3. If Type(P) is String, then
12 a. Let numericIndex be ! CanonicalNumericIndexString(P).
13 b. If numericIndex is not undefined, then
14 i. Let buffer be O.[[ViewedArrayBuffer]].
15 ii. If IsDetachedBuffer(buffer) is true, return false.
16 iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false.
19 includes: [testBigIntTypedArray.js]
20 features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray]
22 testWithBigIntTypedArrayConstructors(function(TA) {
23 var sample = new TA([42n, 43n]);
24 assert.sameValue(Reflect.has(sample, 0), true, 'Reflect.has(sample, 0) must return true');
25 assert.sameValue(Reflect.has(sample, 1), true, 'Reflect.has(sample, 1) must return true');