Skip to content
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

Additional fix to issue #50509 #54423

Merged
merged 2 commits into from
Jun 12, 2023
Merged

Additional fix to issue #50509 #54423

merged 2 commits into from
Jun 12, 2023

Conversation

gulewei
Copy link
Contributor

@gulewei gulewei commented May 27, 2023

This is an additional fix to issue #50509. The issue has been closed by my previous PR #53000, but there is still an unexpected case left over.

I need to check if there is a ThisType<T> for this keyword in its contextual type. I was getting it's containing object literal then to call getApparentTypeOfContextualType and getThisTypeArgument to see what I got, but didn't know I need continue looking in any directly enclosing object literals. I found this already been took care of by some code in getContextualThisParameterType, so I move them into a new function getThisTypeOfObjectLiteralFromContextualType for reuse.

Sorry for have to fix the issue in twice.

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label May 27, 2023
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@sandersn sandersn added this to Not started in PR Backlog Jun 5, 2023
@sandersn sandersn self-assigned this Jun 5, 2023
@sandersn sandersn moved this from Not started to Waiting on reviewers in PR Backlog Jun 5, 2023
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks basically right, just one small style request.

src/compiler/checker.ts Show resolved Hide resolved
PR Backlog automation moved this from Waiting on reviewers to Waiting on author Jun 5, 2023
@gulewei gulewei requested a review from sandersn June 10, 2023 06:15
PR Backlog automation moved this from Waiting on author to Needs merge Jun 12, 2023
@sandersn sandersn merged commit 6a996ac into microsoft:main Jun 12, 2023
17 checks passed
PR Backlog automation moved this from Needs merge to Done Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
PR Backlog
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants