Skip to content

fix(47794): Fix incorrect substitution on index access on generic mapped type with key remapping #47837

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

Conversation

LANGERGabrielle
Copy link

Fixes #47794

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Feb 10, 2022
@ghost
Copy link

ghost commented Feb 10, 2022

CLA assistant check
All CLA requirements met.

@LANGERGabrielle LANGERGabrielle force-pushed the fixed-generic-access-index-on-generic-mapped-type-with-key-remapping branch from f37e783 to 49024cb Compare February 10, 2022 21:29
@LANGERGabrielle LANGERGabrielle force-pushed the fixed-generic-access-index-on-generic-mapped-type-with-key-remapping branch from 49024cb to 481882c Compare February 10, 2022 21:32
Copy link
Member

@ahejlsberg ahejlsberg left a comment

Choose a reason for hiding this comment

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

Unfortunately, this fix isn't correct. We shouldn't be calling substituteIndexedMappedType for mapped types with as clauses (see explanation here), and the proper fix is to ensure that doesn't happen. I can put up a PR to that effect.

@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Backlog Bug PRs that fix a backlog bug labels Feb 21, 2022
@sandersn
Copy link
Member

See also #47889

@weswigham weswigham removed their request for review March 5, 2022 01:34
@sandersn sandersn closed this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Milestone Bug PRs that fix a bug with a specific milestone
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Incorrect substitution on index access with generic key type on generic mapped type with key remapping
4 participants