Closed
Bug 311568
Opened 19 years ago
Closed 19 years ago
[ , ] should make hole, not undefined
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 260106
People
(Reporter: igor, Unassigned)
References
()
Details
Currently SpiderMonkey replaces elisions in array initializers by undefined values so [,].hasOwnProperty(0) gives true while according to ECMA-262 v3, 11.1.4 it should be false as elisions effectively stands for unexisting properties or holes in the array, not undefined values. There is similar problem with misrepresenting holes by undefined values in uneval which use undefined literal for both. For example, given: var a = new Array(3); a[0] = a[2] = 0; SpiderMonkey gives for uneval(a) "[0, undefined, 0]" while expected value is "[0, , 0]" which would properly capture the hole.
Comment 1•19 years ago
|
||
*** This bug has been marked as a duplicate of 260106 ***
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•19 years ago
|
||
(In reply to comment #1) > > *** This bug has been marked as a duplicate of 260106 *** I shoud search next time harder :( I filed for uneval part the bug 311583 then.
You need to log in
before you can comment on or make changes to this bug.
Description
•