Closed
Bug 353017
Opened 18 years ago
Closed 13 years ago
Round-trip change with if(0) function declaration, var of the same name
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jruderman, Unassigned)
Details
(Keywords: testcase)
js> h = (function() { for(var x in []) { x; } if(0) function x() { } })
function () {
for (var x in []) {
x;
}
}
js> eval(""+h)
function () {
for (var x in []) {
}
}
Reporter | ||
Comment 1•18 years ago
|
||
Here's a clearer testcase:
js> f = (function() { var x; if(0) { function x() {} } x; })
function () {
var x;
x;
}
js> eval("(" + f + ")")
function () {
var x;
}
Comment 2•13 years ago
|
||
I get the same output for both cases now in comment #1.
js> f = (function() { var x; if(0) { function x() {} } x; })
(function () {var x;})
js> eval("(" + f + ")")
(function () {var x;})
Reporter | ||
Comment 3•13 years ago
|
||
Comment 0 looks good now too. WFM :)
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.
Description
•