Skip to content

Commit 8f5f6c8

Browse files
Replace enum with a sealed trait for DottyJS compat
1 parent 0451f35 commit 8f5f6c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/src/scala/compiletime/testing/package.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ package object testing {
1212
'{Error(${Expr(e.message)}, ${Expr(e.lineContent)}, ${Expr(e.column)}, ${Expr(e.kind)})}
1313

1414
/** An error can be either a parse-time or a typecheck-time */
15-
enum ErrorKind
16-
case Parser, Typer
15+
sealed trait ErrorKind // TODO make this enum, so far not doable because ScalaJS compilation fails on it
1716

1817
object ErrorKind
18+
case object Parser extends ErrorKind
19+
case object Typer extends ErrorKind
1920
given Liftable[ErrorKind]
2021
import ErrorKind._
2122
def toExpr(e: ErrorKind) = e match

0 commit comments

Comments
 (0)