Closed
Bug 352459
Opened 20 years ago
Closed 19 years ago
Incorrect decompilation for 4..@x++
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jruderman, Unassigned)
Details
(Keywords: testcase)
js> function() { return 4..@x++; }
function () {
return 4.@x++;
}
The 4 wants some parens around itself.
Comment 1•20 years ago
|
||
Sorry, I have to call this minor and leave it in the general@js.bugs pile.
Jeff, feel free to grab it.
/be
Severity: normal → minor
Comment 2•19 years ago
|
||
This seems fixed now:
js> function() { return 4..@x++; }
function () {
return (4).@x++;
}
Marking as WFM (Jeff, feel free to figure out which bug fixed this).
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Updated•19 years ago
|
Flags: in-testsuite?
Comment 3•19 years ago
|
||
It is ok for this to convert the descendant operator ".." to property access "." ?
/cvsroot/mozilla/js/tests/e4x/decompilation/regress-352459.js,v <-- regress-352459.js
initial revision: 1.1
Flags: in-testsuite? → in-testsuite+
Comment 4•19 years ago
|
||
(In reply to comment #3)
> It is ok for this to convert the descendant operator ".." to property access
> "." ?
|4..@x++| is equivalent to |(4.).@x++| which is equivalent to |(4).@x++|; the key is that 4. is a numeric literal, and since the next token isn't a number but is rather .@ the attribute access acts upon (4.). Consequently, tho it looks like it this isn't the descendant operator.
Consider also |3.141592654.toPrecision(3)| or |4..toString()| for very slightly more understandable cases.
I agree this isn't particularly intuitive. :-)
Comment 5•19 years ago
|
||
(In reply to comment #4)
Thanks Jeff, I <3 e4x even less now if at all possible.
You need to log in
before you can comment on or make changes to this bug.
Description
•