dignifiedquire at gmail.com (2015-01-06T19:49:02.791Z)
```js
let f = (x) => {foo: bar};
```
In the implementations I checked, this is actually allowed, but it's parsed
as a label instead of what you may expect at first glance (an object).
Is there any reason this is allowed? If there's no reason other than to
match `function(){}`, this should be a syntax error, in my opinion.
A potentially easier and wider reaching solution here would be to restrict
labels in strict mode to demand a possible break/continue, else it's a
syntax error. The only area I'd be concerned about compatibility is low
level generated JavaScript.
Thoughts?
let f = (x) => {foo: bar}; In the implementations I checked, this is actually allowed, but it's parsed as a label instead of what you may expect at first glance (an object). Is there any reason this is allowed? If there's no reason other than to match function(){}, this should be a syntax error, in my opinion. A potentially easier and wider reaching solution here would be to restrict labels in strict mode to demand a possible break/continue, else it's a syntax error. The only area I'd be concerned about compatibility is low level generated JavaScript. Thoughts? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150105/cb5040dd/attachment.html>