Skip to content

Fix #2745: Dealias before either #2746

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
Jun 13, 2017
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jun 13, 2017

"either" cuts the search space for subtyping. Before we do this,
we should delias the other side to see whether there's something
else we can do instead. In the case

A <:< B | C

we can also safely widen A because singleton types are not allowed
in disjunctions.

"either" cuts the search space for subtyping. Before we do this,
we should delias the other side to see whether there's something
else we can do instead. In the case

    A <:< B | C

we can also safely widen `A` because singleton types are not allowed
in disjunctions.
@odersky odersky requested a review from sjrd June 13, 2017 18:58
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There should probably be a test for the AndType case, though.

@odersky odersky merged commit 243e439 into scala:master Jun 13, 2017
@allanrenucci allanrenucci deleted the fix-#2745 branch December 14, 2017 19:18
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