Skip to content

Forbid inferences to conditional type branches at contravariant positions #30287

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

Merged
merged 1 commit into from
Mar 11, 2019

Conversation

weswigham
Copy link
Member

Fixes #30057

We'll need to run this on DT to see if it's a bad break - if so, we can probably still make the inferences but at a lower priority (since the issue is that the contravariant inference unifies with a covariant inference and produces a poor result for a lambda) - @ahejlsberg had a distaste for doing so when we spoke of it earlier though, so we're trying this first.

@weswigham
Copy link
Member Author

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Mar 9, 2019

Heya @weswigham, I've started to run the Definitely Typed test suite on this PR at 0268003. You can monitor the build here. It should now contribute to this PR's status checks.

@weswigham weswigham changed the title Forbid contravariant inferences to conditional type branches Forbid inferences to conditional type branches at contravariant positions Mar 9, 2019
@weswigham weswigham merged commit ca9566f into microsoft:master Mar 11, 2019
@weswigham weswigham deleted the jsx-mo-money-mo-problems branch March 11, 2019 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants