Skip to content

Commit 8a3d92d

Browse files
committed
Add missing suspendability check
1 parent 31b25e0 commit 8a3d92d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/quoted/Interpreter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ object Interpreter:
346346

347347
object MissingClassDefinedInCurrentRun {
348348
def unapply(targetException: Throwable)(using Context): Option[Symbol] = {
349-
targetException match
349+
if !ctx.compilationUnit.isSuspendable then None
350+
else targetException match
350351
case _: NoClassDefFoundError | _: ClassNotFoundException =>
351352
val className = targetException.getMessage
352353
if className eq null then None

0 commit comments

Comments
 (0)