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

Mapped and indexed access type fixes #17455

Merged
merged 4 commits into from
Aug 2, 2017
Merged

Mapped and indexed access type fixes #17455

merged 4 commits into from
Aug 2, 2017

Conversation

ahejlsberg
Copy link
Member

This PR adds some missing checks related to indexed access types and mapped types. In particular, for an indexed access T[K] the PR ensures that we always check that K is assignable to keyof T. This check was previously not performed when T is a generic mapped type.

Fixes #17238. This PR supercedes #17336, but keeps the tests from that PR.

@ahejlsberg ahejlsberg changed the title Mapped type fixes Mapped and indexed access type fixes Jul 27, 2017
@KiaraGrouwstra
Copy link
Contributor

@ahejlsberg this fixes checks that were too loose, but there's been an inverse issue of checks that are too strict as well, see #15768.

@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants