Closed
Description
Compiler version
I tested on 3.2.2
, 3.3.0-RC6
and 3.nightly
Minimized code
//> using scala 3.2.2
trait FromString[A]:
def parse(s: String): Either[String, A]
sealed trait Uci:
case class Move(from: String, to: String) extends Uci
object Uci extends FromString[Uci]:
def parse(s: String): Either[String, Uci] = ???
or in scastie
Output (click arrow to expand)
Compiling project (Scala 3.2.2, JVM)
exception occurred while compiling /Users/tle/git/lichess/scripts/DottyBroke.scala
Error compiling project (Scala 3.2.2, JVM)
Error: Unexpected error when compiling project_ed944f97cf-10493a1c22: 'assertion failed: asTerm called on not-a-Term val '
Compilation failed
Expect
I expect a better error message.