Skip to content

Commit 1300311

Browse files
committed
Fix the source of inlined trees after Erasure
To ensure that the sources change, the trees need to be copied with the new source rather than preserving it.
1 parent 7ff971f commit 1300311

File tree

5 files changed

+162
-131
lines changed

5 files changed

+162
-131
lines changed

compiler/src/dotty/tools/dotc/Driver.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import dotty.tools.FatalError
66
import config.CompilerCommand
77
import core.Comments.{ContextDoc, ContextDocstrings}
88
import core.Contexts.{Context, ContextBase}
9-
import core.Mode
9+
import core.{Mode, TypeError}
1010
import reporting._
1111

1212
import scala.util.control.NonFatal
@@ -37,6 +37,9 @@ class Driver {
3737
case ex: FatalError =>
3838
ctx.error(ex.getMessage) // signals that we should fail compilation.
3939
ctx.reporter
40+
case ex: TypeError =>
41+
println(s"${ex.toMessage} while compiling ${fileNames.mkString(", ")}")
42+
throw ex
4043
case ex: Throwable =>
4144
println(s"$ex while compiling ${fileNames.mkString(", ")}")
4245
throw ex

0 commit comments

Comments
 (0)