Skip to content

Commit 6a22d29

Browse files
committed
Improve failure diagnostic
1 parent e46d9ab commit 6a22d29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,10 @@ class JSCodeGen()(implicit ctx: Context) {
404404
case EmptyTree => ()
405405
case dd: DefDef => generatedMethods ++= genMethod(dd)
406406
case _ =>
407-
throw new FatalError("Illegal tree in gen of genInterface(): " + tree)
407+
throw new FatalError(
408+
i"""Illegal tree in gen of genInterface(): $tree
409+
|class = $td
410+
|in ${ctx.compilationUnit}""")
408411
}
409412
}
410413

0 commit comments

Comments
 (0)