Comment #3 on issue 3606 by [email protected]: Classes: string property names are not triggering the static errors
https://code.google.com/p/v8/issues/detail?id=3606

(WARNING: this will be hard to read).

```
d8> class Z { static 'prototype'() {} }
(d8):1: SyntaxError: Classes may not have static property named prototype
class Z { static 'prototype'() {} }
                 ^^^^^^^^^^^
SyntaxError: Classes may not have static property named prototype

d8> class ZZ { static 'prot\u006ftype'(){} }
(d8):1: SyntaxError: Classes may not have static property named prototype
class ZZ { static 'prot\u006ftype'(){} }
                  ^^^^^^^^^^^^^^^^
SyntaxError: Classes may not have static property named prototype

d8> class ZZZ { static prototype() {} }
(d8):1: SyntaxError: Classes may not have static property named prototype
class ZZZ { static prototype() {} }
                   ^^^^^^^^^
SyntaxError: Classes may not have static property named prototype

d8>
```

This looks like the behaviour we want right? It's a pretty tiny patch to make that work. Changing ParsePropertyName to support computed properties is more work, but seems out of scope for this bug and something that ought to live in the ComputedPropertyNames CL

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to