Incorrect decompilation for object literal with setter for property called "yield"

RESOLVED DUPLICATE of bug 355736

Status

()

Core
JavaScript Engine
--
minor
RESOLVED DUPLICATE of bug 355736
12 years ago
11 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

(Blocks: 1 bug, {regression, testcase})

Trunk
PowerPC
Mac OS X
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
js> f = function(){ return {set yield(){}}; }
function () {
    return {set 'yield'() {}};
}

js> eval("" + f)
typein:19: SyntaxError: missing : after property id:
typein:19:     return {set 'yield'() {}};
typein:19: ................^
(Reporter)

Comment 1

12 years ago
It is possible to reproduce this bug in JavaScript 1.7 as well:

js> p = {}      
[object Object]

js> p.__defineSetter__("null", function(){})

js> uneval(p) 
({set 'null'() {}})

js> eval(uneval(p))
typein:6: SyntaxError: missing : after property id:
typein:6: ({set 'null'() {}})
typein:6: ......^
Brian, don't you have a bug like this?

Comment 3

11 years ago
bug 355736 is probably a better bug on essentially the same issue.  duping
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 355736
(Reporter)

Updated

11 years ago
No longer blocks: 349611
(Reporter)

Updated

11 years ago
Blocks: 349611
You need to log in before you can comment on or make changes to this bug.