-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fixed multiple prologue directives with parameter properties #48687
Fixed multiple prologue directives with parameter properties #48687
Conversation
@@ -35405,7 +35405,7 @@ namespace ts { | |||
superCallStatement = statement; | |||
break; | |||
} | |||
if (!isPrologueDirective(statement) && nodeImmediatelyReferencesSuperOrThis(statement)) { | |||
if (nodeImmediatelyReferencesSuperOrThis(statement)) { |
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 change isn't necessary for the PR; I just had only noticed the check is unnecessary after #29374 was merged 😄
const indexAfterLastPrologueStatement = factory.copyPrologue(body.statements, statements, /*ensureUseStrict*/ false, visitor); | ||
const superStatementIndex = findSuperStatementIndex(body.statements, indexAfterLastPrologueStatement); | ||
const prologueStatementCount = factory.copyPrologue(body.statements, statements, /*ensureUseStrict*/ false, visitor); | ||
const superStatementIndex = findSuperStatementIndex(body.statements, prologueStatementCount); |
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.
I'm nitpicking the variable name here. Both variable names are correct; prologueStatementCount
just makes more sense to me -- especially in the context of the new array spread below.
Thanks for fixing this! |
@typescript-bot cherry-pick this to release-4.6 |
Heya @jakebailey, I've started to run the task to cherry-pick this into |
Hey @jakebailey, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into release-4.6 manually. |
Sent #48782 manually. This PR is needed for the other PRs thanks to this PR affecting the base |
Two issues:
super()
Fixes #48671