-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Aliases to Hard Unions don't reduce #10129
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
Labels
Comments
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 7, 2020
Given type F[Xs] = ... F[As] <: F[Bs] Do we dealias `F` or check the arguments directly? It turns out that neither choice is correct in all instances. Checking the arguments directly is necessary for hk type inference, but may narrow the constraint too much. The solution is to go to an either that tries both options.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 7, 2020
Given type F[Xs] = ... F[As] <: F[Bs] Do we dealias `F` or check the arguments directly? It turns out that neither choice is correct in all instances. Checking the arguments directly is necessary for hk type inference, but may narrow the constraint too much. The solution is to go to an either that tries both options.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 9, 2020
Given type F[Xs] = ... F[As] <: F[Bs] Do we dealias `F` or check the arguments directly? It turns out that neither choice is correct in all instances. Checking the arguments directly is necessary for hk type inference, but may narrow the constraint too much. The solution is to go to an either that tries both options.
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 10, 2020
Given type F[Xs] = ... F[As] <: F[Bs] Do we dealias `F` or check the arguments directly? It turns out that neither choice is correct in all instances. Checking the arguments directly is necessary for hk type inference, but may narrow the constraint too much. The solution is to go to an either that tries both options.
odersky
added a commit
that referenced
this issue
Nov 14, 2020
Fix #10129: Fix comparisons of applied type aliases
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Minimized code
When we make an alias to a union type, it is not reduced compared to a raw union type, i.e. in the following
Lifted[Int]
is not the same asErr | Int
, despite being an aliasOutput
Expectation
both
ok
andfail
should compileThe text was updated successfully, but these errors were encountered: