Closed lmlynik closed 9 months ago
Updated with smaller example which causes the same issue.
Creash can be minimized to the following snippet.
//> using lib "dev.zio::zio:2.0.18"
import zio.* // removing this import fixes the compilation
trait A
trait B
@main def Test = summon[A <:< B] // should give error, not crash
Working on further minimizaiton
The issue is present only in Scala 3.3.1, it works fine in 3.3.0 and 3.nightly. The bisect of the commit fixing the issue points to the 8a2773f0c6264ef0392d786e36d1beafc74ea222 which seems to fix similar, yet slightly different bug - in our case just the import zio.*
lead to the compiler crash, even though we don't use explicitly any of the symbols introduced by this import. I was not able to figure out why it was crashing.
We probably should backport this change to 3.3.2 and check if the issue was fixed
in our case just the
import zio.*
lead to the compiler crash, even though we don't use explicitly any of the symbols introduced by this import. I was not able to figure out why it was crashing.
Both trace come from noChainConversionsNote
: while we're trying to give the error message more information, we push the compiler to look things up, while operating on type errored code. One of the ways we guards against that is "errorsReported", but unfortunately we're forcing this code evaluation before we've increased the error count (which defines "errorsReported"). So in addition to #18719 and follow up in #18727 I suggest we also address this forcing issue at this more root cause: in Reporter.issueUnconfigured
, before and after isHidden
.
I suggest we also address this forcing issue at this more root cause: in
Reporter.issueUnconfigured
, before and afterisHidden
.
Implementing that in https://github.com/lampepfl/dotty/pull/19113
@dwijnand this will not automatically close after your follow-up. (I don't know whether there is a longer tail to chase.)
Closing as it was fixed in 3.4.0-RC4 and back-ported to 3.3.2-RC3
Compiler version
3.3.1
Minimized code
Scala-CLI repro
Output (click arrow to expand)