Open dhinojosa opened 1 year ago
Bounds tests are run in the phase after type checking. So that's why typeChecks
fails. We cannot run bounds tests during typer since F-bounds would cause cyclic dependencies.
Mitigation: Maybe scala.compiletime.testing.typeChecks
should run bounds checks after type checking proper succeeds?
@odersky @smarter @dhinojosa Fyi we have another issue reported for assertDoesNotCompile
that I think is related to this, with perhaps another minimal example?
https://github.com/scalatest/scalatest/issues/2283
One side note is that Scala 2's scala.reflect.macros.Context.typeCheck
worked, so imho this will look like a regression for user migrating from Scala 2 to Scala 3.
Compiler version
3.2.2
Minimized code
Output
Nothing.
Expectation
It should throw an exception from
typeChecks
sinceBanana
cannot extend fromRecursiveSelfTypeEntity[Apple]