mirror of
https://github.com/tc39/test262.git
synced 2025-07-27 07:54:41 +02:00
Set a proper length reference to avoid conflict with browsers
In browsers length is a valid property of window, so they would have a normal completion instead of a ReferenceError
This commit is contained in:
parent
f6175af556
commit
f4f23cb06b
@ -18,6 +18,8 @@ info: |
|
|||||||
[...]
|
[...]
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
|
//- setup
|
||||||
|
let length = "outer";
|
||||||
//- elems
|
//- elems
|
||||||
[...{ 0: v, 1: w, 2: x, 3: y, length: z }]
|
[...{ 0: v, 1: w, 2: x, 3: y, length: z }]
|
||||||
//- vals
|
//- vals
|
||||||
@ -29,6 +31,4 @@ assert.sameValue(x, 9);
|
|||||||
assert.sameValue(y, undefined);
|
assert.sameValue(y, undefined);
|
||||||
assert.sameValue(z, 3);
|
assert.sameValue(z, 3);
|
||||||
|
|
||||||
assert.throws(ReferenceError, function() {
|
assert.sameValue(length, "outer", "the length prop is not set as a binding name");
|
||||||
length;
|
|
||||||
});
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user