Please checkout my branch with the code that causes failure.
Scala 3.0.0-RC3, Java 11.
sbt "project scala3;clean;compile;test"
(there’s also a script named reproduce
) causes
[info] exception occurred while typechecking /Users/vpatryshev/projects/private/Categories/scala3/src/test/scala/oops/Test.scala
[info] exception occurred while compiling /Users/vpatryshev/projects/private/Categories/scala3/src/test/scala/oops/Test.scala
scala.MatchError: ThisType(TypeRef(ThisType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),object oops),class Container)),module class Something$)) (of class dotty.tools.dotc.core.Types$CachedThisType) while compiling /Users/vpatryshev/projects/private/Categories/scala3/src/test/scala/oops/Test.scala
[error] ## Exception when compiling 1 sources to /Users/vpatryshev/projects/private/Categories/scala3/target/scala-3.0.0-RC3/test-classes
(etc)
I’ll be glad to try it with fresher versions.
To reproduce: clone that branch, https://github.com/vpatryshev/Categories/tree/scala3_compiler_problem
; cd Categories
; ./reproduce
.
Thanks! I love Scala 3 anyway.