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 empty array inference #21157

Merged
merged 4 commits into from
Jan 16, 2018
Merged

Fix empty array inference #21157

merged 4 commits into from
Jan 16, 2018

Conversation

ahejlsberg
Copy link
Member

During inference we now retain inferences from both co- and contra-variant positions, and if the covariant candidates yield never we instead infer from the contravariant candidates. This ensures that we only infer never if there truly is nothing else to infer from.

Fixes #21112.

@ghost
Copy link

ghost commented Jan 12, 2018

May fix #19873?

@ahejlsberg
Copy link
Member Author

@andy-ms No, that's an unrelated issue.

@falsandtru
Copy link
Contributor

ping @sandersn @mhegazy

@ahejlsberg ahejlsberg merged commit 64b3086 into master Jan 16, 2018
@ahejlsberg ahejlsberg deleted the fixEmptyArrayInference branch January 16, 2018 20:42
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 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.

3 participants