Closed
Bug 391350
Opened 18 years ago
Closed 18 years ago
Incorrect type inference for array and object literals
Categories
(Rhino Graveyard :: Compiler, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: norrisboyd, Assigned: norrisboyd)
Details
Attachments
(1 file)
1.14 KB,
patch
|
Details | Diff | Splinter Review |
The program
function f() {
var x = {a:1,b:2};
return x.a;
}
print(f());
will print "undefined" for optimization level 1 instead of 1 due to the optimizer incorrectly assuming the object literal in the tree is an operator with two number type operands that must thus produce a number.
Assignee | ||
Comment 1•18 years ago
|
||
Fixed:
Checking in src/org/mozilla/javascript/optimizer/Block.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/optimizer/Block.java,v <-- Block.java
new revision: 1.37.4.1; previous revision: 1.37
done
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•