I checked the ES5 specs and from §11.1.5 it looks like any
IdentifierName is legal in this context. FutureReservedWord is
excluded from Identifier (because it belongs to ReservedWord) but not
from IdentifierName. So this looks like a bug.


On Oct 14, 4:03 pm, Bruno Jouhier <bjouh...@gmail.com> wrote:
> The following does not compile on V8 (node.js 0.4.11):
>
> "use strict";
> var foo = { enum: 1 }; // compile error
>
> I get a similar error with "yield". On the other hand, I tried with
> various JS keywords (while, break, function) and V8 accepts all of
> them. For example:
>
> "use strict";
> var foo = { break: 1 }; // compiles fine
>
> Looks like a bug in the way V8 treats words that are reserved for
> future use. Or am I missing something?
>
> Bruno

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to