scala3 icon indicating copy to clipboard operation
scala3 copied to clipboard

Exclude match aliases from partial unification attempts

Open odersky opened this issue 3 years ago • 6 comments

Fixes #15983

odersky avatar Sep 08 '22 09:09 odersky

I don't understand what's specific about aliases to match types here, surely we should still be able to construct type lambdas involving them?

smarter avatar Sep 08 '22 16:09 smarter

Well, no, it crashes in the partial unification code otherwise.

odersky avatar Sep 08 '22 16:09 odersky

I think we require that a match type alias is always fully applied.

odersky avatar Sep 08 '22 16:09 odersky

I think we require that a match type alias is always fully applied.

This doesn't seem to be required in sources, using the same TupleUnionLub match type from the test case I can write:

class Foo[F[_]]
val x = new Foo[[X] =>> TupleUnionLub[Tuple, Any, X]]

I would expect partial unification to generate type lambdas like this too.

smarter avatar Sep 08 '22 17:09 smarter

OK, so do you want to take a look at it?

odersky avatar Sep 08 '22 20:09 odersky

I'll assign myself to the issue.

smarter avatar Sep 08 '22 21:09 smarter

Issue has been open for a month now.

odersky avatar Oct 09 '22 10:10 odersky

I did not have a job during that month.

smarter avatar Oct 09 '22 11:10 smarter