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
5 description: Return false if P's value is < 0
7 9.4.5.2 [[HasProperty]](P)
10 3. If Type(P) is String, then
11 a. Let numericIndex be ! CanonicalNumericIndexString(P).
12 b. If numericIndex is not undefined, then
14 iii. If ! IsValidIntegerIndex(O, numericIndex) is false, return false.
16 includes: [testBigIntTypedArray.js]
17 features: [align-detached-buffer-semantics-with-web-reality, BigInt, Reflect, TypedArray]
21 // Prevents false positives using OrdinaryHasProperty
22 TypedArray.prototype[-1] = "test262";
24 testWithBigIntTypedArrayConstructors(function(TA) {
25 var sample = new TA(1);
27 assert.sameValue(Reflect.has(sample, "-1"), false, 'Reflect.has(sample, "-1") must return false');