Status: Accepted
Owner: ----
CC: [email protected], [email protected]
Labels: Type-Bug Priority-Medium Harmony
New issue 3831 by [email protected]: ClassDeclaration should not be
produced when parsing classes in statement context
https://code.google.com/p/v8/issues/detail?id=3831
Test case:
"use strict";
if (true) class Foo { constructor() { print('foo') } }
new Foo();
prints "foo", but should not.
My reading of
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-class-definitions
makes it a bit unclear what should happen. Either this is a SyntaxError, in
that a ClassDeclaration should fail to be created (since this needs a
Statement), or it's a ReferenceError, if "class Foo ..." is parsed as a
ClassExpression. Either way, "foo" should not be printed.
--
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.