Skip to content

Fix #2064: Avoid illegal types in OrDominator #2068

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 3 commits into from
Mar 9, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 8, 2017

Need to skip type bounds in underlying chain, since
TypeBounds is not a legal operand type for OrType.

Fixes #2064

Need to skip type bounds in `underlying` chain, since
TypeBounds is not a legal operand type for OrType.
@odersky
Copy link
Contributor Author

odersky commented Mar 8, 2017

Review by @gsps?

`superType` should never return a `TypeBounds` in the first place.
This commit makes sure it doesn't.
@odersky
Copy link
Contributor Author

odersky commented Mar 8, 2017

@gsps To find out what the typer does, it's sometimes helpful to compile with

 -Xprint:front -Xprint-types

@@ -1276,7 +1276,10 @@ object Types {
* except for TypeRefs where the upper bound is returned, and HKApplys,
Copy link
Member

Choose a reason for hiding this comment

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

This comment is no longer accurate since this isn't limited to TypeRef anymore, right?

@gsps
Copy link
Contributor

gsps commented Mar 9, 2017

LGTM

@odersky odersky merged commit 7f6e01d into scala:master Mar 9, 2017
@allanrenucci allanrenucci deleted the fix-#2064 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.

3 participants