Skip to content

Fix #9479: Widen unions in inferred type lambdas #9488

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
Aug 6, 2020

Conversation

smarter
Copy link
Member

@smarter smarter commented Aug 3, 2020

In the same way that when instantiating a type variable to A | B we
first try to replace the union type by a non-union upper bound, we now
also try to widen [X] =>> A | B to a type lambda whose body is not a
union.

In the same way that when instantiating a type variable to `A | B` we
first try to replace the union type by a non-union upper bound, we now
also try to widen `[X] =>> A | B` to a type lambda whose body is not a
union.
@smarter smarter requested a review from odersky August 3, 2020 18:29
@nicolasstucki nicolasstucki linked an issue Aug 5, 2020 that may be closed by this pull request
@odersky odersky merged commit b8825a2 into scala:master Aug 6, 2020
@odersky odersky deleted the widen-union-hk branch August 6, 2020 15:49
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.

Union types don't get widened within a type lambda
2 participants