Closed prolativ closed 1 year ago
This fails during the type assigning of the TypeApply for "$asInstanceOf$" (which for some reason prints as "$asInstanceOf") during post-typer (even though for some reason "at sbt-api" is printed...). The type assigner wants the widened TypeLambda instead finds a TermRef with NoType as its widening. The TermRef is Tuple.Head[Foo *: tail]#value.$asInstanceOf.type
. During typer, while GADT constraints are still present, that's type is (Foo#value : Int) & Int
, because Tuple.Head[Foo *: tail]
can reduce to Foo
.
So GADT constraints/casting and Match Type reduction/caching issues, AFAICT.
(edit) Oh, and where did that cast come from? From GADT casting of course..
Bisected to https://github.com/lampepfl/dotty/pull/15872
This works now
Compiler version
Fails with: 3.2.1, 3.2.2-RC1-bin-20221030-eab19e3-NIGHTLY Used to work with 3.2.0
Minimized code
Output
Expectation
Should compile, as in 3.2.0