Skip to content

Use scope flags to check arguments#10801

Merged
nicolo-ribaudo merged 2 commits intobabel:masterfrom
JLHwung:fix-10771
Dec 5, 2019
Merged

Use scope flags to check arguments#10801
nicolo-ribaudo merged 2 commits intobabel:masterfrom
JLHwung:fix-10771

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Dec 3, 2019

Q                       A
Fixed Issues? Fixes #10771
Patch: Bug Fix? Y
Tests Added + Pass? Yes
License MIT

In this PR we introduce inClass accessor in ScopeHandler and use it to check arguments keyword. Please refer to this thread for the background.

Co-authored-by: Jens Maier<jens@elberet.de>
@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Class Fields labels Dec 3, 2019
Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test with arrow functions?

class A {
  x = () => arguments;
}

@JLHwung
Copy link
Copy Markdown
Contributor Author

JLHwung commented Dec 5, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Bug Fix 🐛 A type of pull request used for our changelog categories Spec: Class Fields

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use of arguments should be permitted even in a field initializer, if the field is initialized with a class expression.

3 participants