Closed Bug 382548 Opened 18 years ago Closed 14 years ago

Round-trip paren change with hoisting

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

js> f = function() { for(let x = ((x.(/a/)) + (x += 1)) in []) {} } function () { (x.(/a/)) + (x += 1); for (let x in []) { } } js> eval("(" + f + ")") function () { x.(/a/) + (x += 1); for (let x in []) { } }
js> f = function() { for(let x = ((x.(/a/)) + (x += 1)) in []) {} } typein:18: SyntaxError: for-in loop let declaration may not have an initializer: typein:18: f = function() { for(let x = ((x.(/a/)) + (x += 1)) in []) {} } typein:18: .........................^
Cool, I guess this case of hoisting is gone. And if I use "var" instead of "let", I get something stable. WFM :)
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.