Status: New
Owner: ----
New issue 3898 by [email protected]: sloppy mode 'const' that shadows
generator method arg does not throw SyntaxError ('let' does)
https://code.google.com/p/v8/issues/detail?id=3898
My understanding is that 'let' and 'const' are equivalent in terms of
lexical scoping. Yet in sloppy mode, I find they are treated differently
here.
$ d8 --es-staging -e 'obj = { *foo(x) { let x = 3; } } '
unnamed:1: SyntaxError: Block-scoped declarations (let, const, function,
class) not yet supported outside strict mode
obj = { *foo(x) { let x = 3; } }
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not
yet supported outside strict mode
$ d8 --es-staging -e 'obj = { *foo(x) { const x = 3; } } '
V8 version 4.2.0 (candidate) [console: dumb]
--
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.