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
Fix compilation of nested super(...)
calls
#14709
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52417/ |
I edited your description adding "Fixes" before the issue number. By doing so, it will be automatically closed when this PR is merged 🙂 |
The failing tests is a network error, I'll restart it. |
oh right, thanks! |
@@ -399,22 +399,22 @@ export default function transformClass( | |||
); | |||
} | |||
|
|||
const bareSupers = new Set<NodePath<t.CallExpression>>(); | |||
const bareSupers = new Array<NodePath<t.CallExpression>>(); |
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.
Nit:
const bareSupers = new Array<NodePath<t.CallExpression>>(); | |
const bareSupers: NodePath<t.CallExpression>[] = []; |
will be shorter.
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.
Also, new Array
is usually considered badTM because as soon as you start passing arguments to it it has inconsistent behaviors.
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.
👌 done
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.
Thanks.
super(...)
calls
Thanks! |
The bug along with the fix are described in details in the issue. No need to duplicate I think .