-
Notifications
You must be signed in to change notification settings - Fork 143
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
super does not work in constructor #323
Comments
Thanks for reporting. I actually didn't realize that |
I was planning on fixing it today. Feel free to assign to me |
arv
added a commit
to arv/sucrase
that referenced
this issue
Oct 26, 2018
The old code assumed that `super` always followed by a `(` which is not the case. Also adds tests for invalid (at runtime) code with multiple `super()` and `super.m()` / `super.x` / `super.x = 1` before `super()`. Fixes alangpierce#323
arv
added a commit
to arv/sucrase
that referenced
this issue
Oct 26, 2018
The old code assumed that `super` always followed by a `(` which is not the case. Also adds tests for invalid (at runtime) code with multiple `super()` and `super.m()` / `super.x` / `super.x = 1` before `super()`. Fixes alangpierce#323
alangpierce
pushed a commit
that referenced
this issue
Oct 28, 2018
The old code assumed that `super` always followed by a `(` which is not the case. Also adds tests for invalid (at runtime) code with multiple `super()` and `super.m()` / `super.x` / `super.x = 1` before `super()`. Fixes #323
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://sucrase.io/#selectedTransforms=jsx&code=%0Aclass%20Y%20extends%20X%20%7B%0A%20%20%20%20constructor()%20%7B%0A%20%20%20%20%20%20%20%20super()%3B%0A%20%20%20%20%20%20%20%20super.m()%3B%0A%20%20%20%20%7D%0A%7D%3B%0A
Same error happens with
super.x
andsuper.x = 1
The text was updated successfully, but these errors were encountered: