Status: Untriaged
Owner: ----
New issue 4412 by [email protected]: Shorthand property name `get` and
`set` throws SyntaxError
https://code.google.com/p/v8/issues/detail?id=4412
Version: 4.7.31
OS: Windwos 7 64 bit
Architecture: x64
What steps will reproduce the problem?
1. Use get in the object literal
2.
3.
What is the expected output?
V8 doesn't throw exception.
What do you see instead?
V8 throws exception (SyntaxError).
Please use labels and text to provide additional information.
The following code throws SyntaxError in V8 (V8 4.7.31/ Google Chrome
Canary 47.0.2503.0).
However Firefox (Nightly 43.0a1 20150903030225) doesn't throw any exceptions
var foo = 'foo';
var o1 = { foo };
console.log(o1.foo); // -> 'foo'
var set = 'set';
var o2 = { get }; // V8: throws Uncaught SyntaxError: Unexpected token }
console.log(o2.get);
var get = 'get';
var o3 = { set }; // V8: throws Uncaught SyntaxError: Unexpected token }
console.log(o3.set);
var o4 = { get, set } // V8: throws Uncaught SyntaxError: Unexpected token ,
console.log(o4.get, o4.set);
--
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.