Closed Bug 351104 Opened 19 years ago Closed 19 years ago

Round-trip change with ternary in for's initial-expression

Categories

(Core :: JavaScript Engine, defect)

PowerPC
macOS
defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: testcase, verified1.8.1.1)

> function () { for((0 ? 2 : ({})); ; ) { } } function () { for (({});;) { } } > function () { for (({});;) { } } function () { for ({};;) { } } Round-trip changes through the decompiler make my fuzzer in bug 349611 sad. I'm not sure which decompilation is "better". If the first one (with the extra parens) is deemed "better", maybe this bug and bug 350991 can be fixed together.
Oops, you don't need an object literal, just parens. Simpler testcase: > function () { for(0 ? 2 : (z); ; ) { } } function () { for ((z);;) { } } > function () { for ((z);;) { } } function () { for (z;;) { } }
Summary: Round-trip change with ternary and object literal in for's initial-expression → Round-trip change with ternary in for's initial-expression
Fixed by the forthcoming patch for bug 350531. /be
Depends on: 350531
Fixed by the patch for bug 350531. /be
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Checking in regress-351104.js; /cvsroot/mozilla/js/tests/js1_5/Regress/regress-351104.js,v <-- regress-351104.js initial revision: 1.1
Flags: in-testsuite+
verified fixed 1.9a1_2006090707 windows/mac*/linux
Status: RESOLVED → VERIFIED
fixed by bug 350531. verified fixed 20061203 1.8.1.1 windows/linux/mac*
Keywords: verified1.8.1.1
You need to log in before you can comment on or make changes to this bug.