Closed
Description
Followup to #19398.
Minimized code
// Test.scala
class Foo
sbt> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
sbt> scala3-bootstrapped/scalac Test.scala
Output
sbt:scala3> scala3-bootstrapped/scalac Test.scala
[info] running (fork) dotty.tools.dotc.Main -d dotty/compiler/../out/default-last-scalac-out.jar -classpath /Users/nicolasstucki/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:dotty/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.4.1-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.4.1-RC1-bin-SNAPSHOT.jar:dotty/scala2-library-cc-tasty/../out/bootstrap/scala2-library-cc-tasty/scala-3.4.1-RC1-bin-SNAPSHOT-nonbootstrapped/scala2-library-cc-tasty_3-3.4.1-RC1-bin-SNAPSHOT.jar Test.scala
Exception in thread "main"
unhandled exception while running MegaPhase{elimErasedValueType, pureStats, vcElideAllocations, etaReduce, arrayApply, elimPolyFunction, tailrec, completeJavaEnums, mixin, lazyVals, memoize, nonLocalReturns, capturedVars} on Test.scala
An unhandled exception was thrown in the compiler.
Please file a crash report here:
https://github.com/lampepfl/dotty/issues/new/choose
For non-enriched exceptions, compile with -Yno-enrich-error-messages.
while compiling: Test.scala
during phase: MegaPhase{elimErasedValueType, pureStats, vcElideAllocations, etaReduce, arrayApply, elimPolyFunction, tailrec, completeJavaEnums, mixin, lazyVals, memoize, nonLocalReturns, capturedVars}
mode: Mode(ImplicitsEnabled)
library version: version 2.13.12
compiler version: version 3.4.1-RC1-bin-SNAPSHOT-git-2b40f55
settings: -classpath ~/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:dotty/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.4.1-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.4.1-RC1-bin-SNAPSHOT.jar:dotty/scala2-library-cc-tasty/../out/bootstrap/scala2-library-cc-tasty/scala-3.4.1-RC1-bin-SNAPSHOT-nonbootstrapped/scala2-library-cc-tasty_3-3.4.1-RC1-bin-SNAPSHOT.jar -d /
dotty.tools.dotc.core.CyclicReference: Cyclic reference involving trait Seq
Run with -explain-cyclic for more details.