Closed Bug 355980 Opened 19 years ago Closed 13 years ago

Round-trip change with if(1) { function declaration }

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

js> f = function() { if(1) {x; function x() { } } } function () { x; function x() { } } js> eval("" + f) function () { function x() { } } Related to bug 353017?
This can cause compilation errors: js> f = (function(){ if(1) { function x(){} } const x; }) function () { function x() { } const x; } js> eval(uneval(f)) typein:8: TypeError: redeclaration of function x: typein:8: const x;}) typein:8: ......^
OS: Mac OS X → All
Hardware: PowerPC → All
Fixed by saving the source.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.