-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for duplicate private methods (early-error) #2308
Conversation
d4b50bb
to
ef185e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I just left some nit comments.
/*--- | ||
desc: It's a SyntaxError if a class contains a private async generator and a private field with the same name | ||
info: | | ||
Static Semantics: Early Errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very nit picking, but we use 2-space indentation.
/*--- | ||
desc: It's a SyntaxError if a class contains a private async function and a private field with the same name | ||
info: | | ||
Static Semantics: Early Errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
/*--- | ||
desc: It's a SyntaxError if a class contains a private generator and a private field with the same name | ||
info: | | ||
Static Semantics: Early Errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a minor fix and this should be good to ship
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
template: syntax/invalid | ||
features: [class-methods-private] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix the features used.
Here you have at least class-methods-private, class-fields-private, async-iteration
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
template: syntax/invalid | ||
features: [class-methods-private] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class-methods-private, class-fields-private, async-functions
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
template: syntax/invalid | ||
features: [class-methods-private] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class-methods-private, class-fields-private, generators
@leobalter Thanks for pointing those out. Fixed. |
ClassBody : ClassElementList | ||
It is a Syntax Error if PrivateBoundNames of ClassBody contains any duplicate entries, unless the name is used once for a getter and once for a setter and in no other entries. | ||
template: syntax/invalid | ||
features: [class-methods-private class-fields-private async-iteration] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
features must be comma separated
This PR is for #1343
We are currently missing test coverage for async functions, generators and async generators. This PR adds coverage for those.