Closed
Bug 156510
Opened 22 years ago
Closed 22 years ago
for (i in undefined) {} should not throw TypeError
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
VERIFIED
DUPLICATE
of bug 136893
1.5R4
People
(Reporter: igor, Assigned: norrisboyd)
Details
According to the bug 131348, ECMA specs that require to throw TypeError in
for (var i in undefined) {}
for (var i in null) {}
does not reflect a common usage that assumes that such statements behave exactly as
for (var i in {}) { ... }
and there is a proposal to fix this in the ECMA standard.
Rhino should follow SM, Netscape 4.* and Internet Explorer and treat null and
undefined values in such for loops as objects with no enumeratable properties.
Comment 1•22 years ago
|
||
Igor: you raise a good point! But this has already been filed as bug 136893,
"Rhino treatment of |for(i in undefined)|, |for(i in null)|"
You will be cc'ed on that bug so you can follow its progress -
*** This bug has been marked as a duplicate of 136893 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•