Skip to content

Fix type lambda reductions involving refinements #6272

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 10, 2019

Conversation

smarter
Copy link
Member

@smarter smarter commented Apr 9, 2019

Given:

type F[X] = Foo[X]

We've always been able to reduce F[_] to Foo[_] if Foo is a class.
This commit does something similar for refinements, given:

type G[X] = Bla { type R = X }

We can reduce G[_] to Bar { type R } (previously we reduced it to
Bar { type R = Any } which is incorrect).

Given:

    type F[X] = Foo[X]

We've always been able to reduce `F[_]` to `Foo[_]` if `Foo` is a class.
This commit does something similar for refinements, given:

    type G[X] = Bla { type R = X }

We can reduce `G[_]` to `Bar { type R }` (previously we reduced it to
`Bar { type R = Any }` which is incorrect).
@smarter smarter requested a review from odersky April 9, 2019 18:12
@odersky odersky merged commit 7a70cb2 into scala:master Apr 10, 2019
@allanrenucci allanrenucci deleted the fix-reductions branch April 10, 2019 16: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