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

Fix conditional type variance #22869

Merged
merged 7 commits into from
Mar 26, 2018
Merged

Fix conditional type variance #22869

merged 7 commits into from
Mar 26, 2018

Conversation

ahejlsberg
Copy link
Member

@ahejlsberg ahejlsberg commented Mar 25, 2018

This PR adds a missing type relationship for conditional types: Two conditional types T1 extends U1 ? X1 : Y1 and T2 extends U2 ? X2 : Y2 are related if

  • one or both of T1 and T2 is related to the other,
  • U1 and U2 are identical types,
  • X1 is related to X2, and
  • Y1 is related to Y2.

Fixes #22860.

@ahejlsberg
Copy link
Member Author

@DanielRosenwasser @mhegazy I think we should include this one in 2.8.1.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 26, 2018

it is a bit late for 2.8.1, but should be in 2.8.2

ahejlsberg added a commit that referenced this pull request Mar 26, 2018
@ahejlsberg ahejlsberg merged commit fe8f239 into master Mar 26, 2018
@ahejlsberg ahejlsberg merged commit 9acdb75 into master Mar 26, 2018
@ahejlsberg ahejlsberg deleted the fixConditionalTypeVariance branch March 26, 2018 16:36
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 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.

2 participants