diff --git a/src/dotty/tools/dotc/core/Constraint.scala b/src/dotty/tools/dotc/core/Constraint.scala index 9354e18f86a8..64fb8764ebb6 100644 --- a/src/dotty/tools/dotc/core/Constraint.scala +++ b/src/dotty/tools/dotc/core/Constraint.scala @@ -8,6 +8,7 @@ import collection.mutable import printing.{Printer, Showable} import printing.Texts._ import config.Config +import config.Printers._ /** Constraint over undetermined type parameters * @param myMap a map from PolyType to arrays. @@ -304,5 +305,5 @@ trait ConstraintRunInfo { self: RunInfo => maxConstraint = c } def printMaxConstraint()(implicit ctx: Context) = - if (maxSize > 0) println(s"max constraint = ${maxConstraint.show}") + if (maxSize > 0) typr.println(s"max constraint = ${maxConstraint.show}") } diff --git a/src/dotty/tools/dotc/typer/FrontEnd.scala b/src/dotty/tools/dotc/typer/FrontEnd.scala index 0161c1f6ffd2..030f255bf46b 100644 --- a/src/dotty/tools/dotc/typer/FrontEnd.scala +++ b/src/dotty/tools/dotc/typer/FrontEnd.scala @@ -12,13 +12,17 @@ class FrontEnd extends Phase { def name = "frontend" - def monitor(doing: String)(body: => Unit)(implicit ctx: Context) = - try body - catch { + def monitor(doing: String)(body: => Unit)(implicit ctx: Context) = { + def action = s"$doing ${ctx.compilationUnit}" + try { + ctx.inform(action) + body + } catch { case ex: Throwable => - println(s"exception occured while $doing ${ctx.compilationUnit}") + println(s"exception occured while $action") throw ex } + } def parse(implicit ctx: Context) = monitor("parsing") { val unit = ctx.compilationUnit diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 9132ce9c4d72..7f3ca38a32f7 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -52,7 +52,7 @@ class tests extends CompilerTest { @Test def dotc = compileDir(dotcDir + "tools/dotc") @Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast") - @Test def dotc_config = compileDir(dotcDir + "tools/dotc/config") + @Test def dotc_config = compileDir(dotcDir + "tools/dotc/config", List("-verbose")) @Test def dotc_core = compileDir(dotcDir + "tools/dotc/core") @Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling") @Test def dotc_transform = compileDir(dotcDir + "tools/dotc/core/transform")