mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
Merge pull request #271 from bterlson/better-negative-length
Use a very negative number so ES5 implementations don't loop forever
This commit is contained in:
commit
cc2278cbb1
@ -9,14 +9,14 @@ description: Array.prototype.concat array like negative length
|
|||||||
includes: [compareArray.js]
|
includes: [compareArray.js]
|
||||||
---*/
|
---*/
|
||||||
var obj = {
|
var obj = {
|
||||||
"length": -6,
|
"length": -4294967294,
|
||||||
"1": "A",
|
"1": "A",
|
||||||
"3": "B",
|
"3": "B",
|
||||||
"5": "C"
|
"5": "C"
|
||||||
};
|
};
|
||||||
obj[Symbol.isConcatSpreadable] = true;
|
obj[Symbol.isConcatSpreadable] = true;
|
||||||
assert(compareArray([].concat(obj), []));
|
assert(compareArray([].concat(obj), []));
|
||||||
obj.length = -6.7;
|
obj.length = -4294967294;
|
||||||
assert(compareArray([].concat(obj), []));
|
assert(compareArray([].concat(obj), []));
|
||||||
obj.length = "-6";
|
obj.length = "-4294967294";
|
||||||
assert(compareArray([].concat(obj), []));
|
assert(compareArray([].concat(obj), []));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user