[Webkit-unassigned] [Bug 57295] New: ES5 Strict mode does not allow getter and setter for same propId

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 28 20:08:26 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57295

           Summary: ES5 Strict mode does not allow getter and setter for
                    same propId
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
               URL: http://static.ryanberdeen.com/share/2011/03/strict-acc
                    essor.html
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ryan at ryanberdeen.com


In strict mode, an object literal with a getter and setter for the same property will cause WebKit to raise a syntax error.

This should be valid, but raises a syntax error due to the presence of the setter:

'use strict';
var o = {
    get x () {},
    set x () {}
};

Changing the property name for either getter or setter will eliminate the syntax error.

This behavior does not seem to follow ยง11.1.5.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list