Closed
Bug 355980
Opened 19 years ago
Closed 13 years ago
Round-trip change with if(1) { function declaration }
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
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?
| Reporter | ||
Comment 1•16 years ago
|
||
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: ......^
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: PowerPC → All
Comment 2•13 years ago
|
||
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.
Description
•