Closed Bug 475895 Opened 16 years ago Closed 12 years ago

Round-trip change with multiple ternary operator uses

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

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.
Fixed by saving the source.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.