-
Notifications
You must be signed in to change notification settings - Fork 825
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
Class method with name get
throws incorrect "invalid property name" exception
#261
Comments
get
throws exception.get
throws incorrect "invalid property name" exception
I just tried this:
And it works. Property names can be identifiers, numbers, strings or computed property names (expressions between Now the question is should
So we should accept |
@chqrlie Are you also considering allowing a class method to have a name of a reserved keyword? I'm facing a compatibility issue that happens because: class Example {
static() { return 1234 }
} is not supported on quickjs |
@gabrielmfern: yes, the fix should also allow this particular case. |
- accept `class P { async = 1 }}` - accept `class P { static = 1 }}` etc. - Fixes bellard#261
- accept `class P { async = 1 }}` - accept `class P { static = 1 }}` etc. - Fixes #261
When using arrow functions to define methods on a class, QJS throws exception:
The text was updated successfully, but these errors were encountered: