Skip to content

Fix pruning when adding a constraint #6204

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
Apr 2, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 1, 2019

The variance in the code was exactly the opposite of what was claimed
in the comment. The reasoning in the comment was right.

The variance in the code was exactly the opposite of what was claimed
in the comment. The reasoning in the comment was right.
@odersky
Copy link
Contributor Author

odersky commented Apr 1, 2019

@milessabin: This PR should fix the implicit functor test case. It was a wrong flag for the variance of an approximation that is needed in the case where we compare type lambdas like [x] => x against [x] => y. This caused a weakened approximation constraint where a stronger one was necessary. The fix is one inserted !. Sorry this caused so much confusion before it was fixed.

Can you check whether this fixes your original non-minimized test case as well?

@odersky odersky requested a review from milessabin April 1, 2019 19:45
@odersky odersky assigned odersky and milessabin and unassigned odersky Apr 1, 2019
@milessabin
Copy link
Contributor

@odersky thanks for digging in to this! Yes, it does fix the unminimized case as well :-)

@milessabin milessabin merged commit 578d400 into scala:master Apr 2, 2019
@allanrenucci allanrenucci deleted the fix-constraint-prune branch April 2, 2019 10:47
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.

2 participants