Skip to content

Fix #5422: prefer type tp1 in Typ(tp1) - Prod(tp2, ...) #5425

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
Nov 19, 2018

Conversation

liufengyun
Copy link
Contributor

Fix #5422: prefer type tp1 in Typ(tp1) - Prod(tp2, ...)

In Typ(tp1) - Prod(tp2, ...) with tp1 <: tp2, we rewrite
Typ(tp1) to Prod(tpx, Nil). We should prefer tp1 over
tp2, as the latter is usually a bigger space, due to the
erasure of pattern bound symbol references during
pattern-space projection.

In `Typ(tp1) - Prod(tp2, ...)` with `tp1 <: tp2`, we rewrite
`Typ(tp1)` to `Prod(tpx, Nil)`. We should prefer `tp1` over
`tp2`, as the latter is usually a bigger space, due to the
erasure of pattern bound symbol references during
pattern-space projection.
@abgruszecki abgruszecki merged commit 36281b3 into scala:master Nov 19, 2018
@abgruszecki abgruszecki deleted the fix-5422 branch November 19, 2018 09:45
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