-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Add failing test for reverse mapped this leak (#62779)
#62801
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
|
@priyankagnana please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Related to #62779
This PR adds a failing compiler test for issue #62779.
Summary
The test demonstrates that
thisinside a reverse-mapped type leaks a generic key type and causes incorrect inference (T[string]) instead of the concrete property return type.Files added
Reproduction
The test is the minimal reproduction from the issue and is runnable with the existing test harness.
Notes
npm test -- tests/cases/compiler/reverseMappedThisLeak.ts(should pass once baselines are inreference/)npm test -- --generateBaselinewas used earlier to create these baselines.(Please let me know if maintainers want a smaller repro or further variations.)