Bug 22663

Summary: Property names not allowed in objects if they form part of js syntax
Product: WebKit Reporter: David Semeria <david>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   

David Semeria
Reported 2008-12-04 16:06:24 PST
I had a look around and couldn't find any references to this... basically this is the problem: var o = new Obj(); o.if = 'will make parser fall over'; o.then = 'will make parser fall over'; o.and = 'will make parser fall over'; o.switch = 'will make parser fall over'; o.unreserved_word = 'thats ok' I don't know what the ECMA spec says, but I've got 50,000 lines of code in FF running fine with reserved words as property names. Tks D.
Attachments
Gavin Barraclough
Comment 1 2011-06-11 12:48:38 PDT
We support this these days. (Our old behaviour certainly was correct, spec wise at least - I forget if this a non-spec feature we've adopted from FireFox, or if this was added in ES5).
Note You need to log in before you can comment on or make changes to this bug.