Round-trip change with multiple ternary operator uses

RESOLVED WORKSFORME

Status

()

--
minor
RESOLVED WORKSFORME
10 years ago
6 years ago

People

(Reporter: jruderman, Unassigned)

Tracking

(Blocks: 1 bug, {testcase})

Trunk
x86
Mac OS X
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
js> f = function(a) { return (a ? 2 : 3) ? 4 : 5; }
function (a) {
    return a ? 2 : 3 ? 4 : 5;
}

js> eval(uneval(f))
function (a) {
    return a ? 2 : 4;
}

Similarly, "(a ? 2 : x) ? 4 : 5" is given different bytecode than "a ? 2 : x ? 4 : 5", although in that case both decompile the same way.

Comment 1

6 years ago
Fixed by saving the source.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.