Status: New
Owner: ----

New issue 1984 by utatane.tea: ObjectLiteral getter or setter name is not restricted by strict mode restriction
http://code.google.com/p/v8/issues/detail?id=1984

Currently,

function test() { 'use strict'; var obj = { get eval() { } }; }

is restricted as SyntaxError by strict mode restrictions in V8.

But according to ECMA262 5.1 section 11.1.5
"It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code or if its FunctionBody is strict code."

Getter name is PropertyName and it is not PropertySetParameterList, so 'eval' and 'arguments' as getter (or setter) name are allowed in strict code.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to