Closed Bug 568734 Opened 11 years ago Closed 9 years ago

Some decompiled code with sharps does not compile

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

jsfunfuzz discovered this quickly after I let it know that bug 367731 was marked as WFM.

js> (function () {#1=(a = b);})
(function () {#1=a = b;})

js> (function () {#1=a = b;})   
typein:10: SyntaxError: invalid assignment left-hand side:
typein:10: (function () {#1=a = b;})
typein:10: ...................^
//problem is in another case 
// say following 
(function () {x={a:x=(a = b, 1)};})
;// give ==>
(function () {x = {a: x = (a = b, 1)};})
;// give ==>
(function () {x = {a: x = (a = b, 1)};})

; // but 

(function () {x={a:#1=(a = b, a)};})
; // gives ==>
(function () { x = {a: #1=a = b, a};})
; // gives ==>
// error invalid assignment left-hand side

issue exist even in 
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.5pre) 
Gecko/20100530 Namoroka/3.6.5pre
// original case work around 
(function () {#1=(a = b);})
;// make it as ==>
(function () {a =(#1=b);})
;// gives ==>
(function () {a = #1=b;})
;// gives ==>
(function () {a = #1=b;})
;
OS: Mac OS X → All
Hardware: x86 → All
Fixed by bug 566700, the removal of sharp variables.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.