diff options
Diffstat (limited to 'src/dotty')
-rw-r--r-- | src/dotty/tools/dotc/config/CompilerCommand.scala | 8 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/TypeComparer.scala | 12 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 2 | ||||
-rw-r--r-- | src/dotty/tools/dotc/reporting/Reporter.scala | 12 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/dotty/tools/dotc/config/CompilerCommand.scala b/src/dotty/tools/dotc/config/CompilerCommand.scala index 629042291..3ba8db3ba 100644 --- a/src/dotty/tools/dotc/config/CompilerCommand.scala +++ b/src/dotty/tools/dotc/config/CompilerCommand.scala @@ -110,19 +110,19 @@ object CompilerCommand extends DotClass { if (summary.errors.nonEmpty) { summary.errors foreach (ctx.error(_)) - ctx.echo(" dotc -help gives more information") + ctx.println(" dotc -help gives more information") Nil } else if (settings.version.value) { - ctx.echo(versionMsg) + ctx.println(versionMsg) Nil } else if (shouldStopWithInfo) { - ctx.echo(infoMessage) + ctx.println(infoMessage) Nil } else { if (summary.arguments.isEmpty && !settings.resident.value) - ctx.echo(usageMessage) + ctx.println(usageMessage) summary.arguments } } diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala index 1feeaca64..6aee47945 100644 --- a/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/src/dotty/tools/dotc/core/TypeComparer.scala @@ -1148,13 +1148,13 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling wi } /** Show subtype goal that led to an assertion failure */ - def showGoal(tp1: Type, tp2: Type) = { - println(disambiguated(implicit ctx => s"assertion failure for ${tp1.show} <:< ${tp2.show}, frozen = $frozenConstraint")) + def showGoal(tp1: Type, tp2: Type)(implicit ctx: Context) = { + ctx.println(disambiguated(implicit ctx => s"assertion failure for ${tp1.show} <:< ${tp2.show}, frozen = $frozenConstraint")) def explainPoly(tp: Type) = tp match { - case tp: PolyParam => println(s"polyparam ${tp.show} found in ${tp.binder.show}") - case tp: TypeRef if tp.symbol.exists => println(s"typeref ${tp.show} found in ${tp.symbol.owner.show}") - case tp: TypeVar => println(s"typevar ${tp.show}, origin = ${tp.origin}") - case _ => println(s"${tp.show} is a ${tp.getClass}") + case tp: PolyParam => ctx.println(s"polyparam ${tp.show} found in ${tp.binder.show}") + case tp: TypeRef if tp.symbol.exists => ctx.println(s"typeref ${tp.show} found in ${tp.symbol.owner.show}") + case tp: TypeVar => ctx.println(s"typevar ${tp.show}, origin = ${tp.origin}") + case _ => ctx.println(s"${tp.show} is a ${tp.getClass}") } explainPoly(tp1) explainPoly(tp2) diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 9d1385c72..476ea3841 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -504,7 +504,7 @@ object Types { case ex: MergeError => throw new MergeError(s"${ex.getMessage} as members of type ${pre.show}") case ex: Throwable => - println(i"findMember exception for $this member $name") + ctx.println(i"findMember exception for $this member $name") throw ex // DEBUG } finally { diff --git a/src/dotty/tools/dotc/reporting/Reporter.scala b/src/dotty/tools/dotc/reporting/Reporter.scala index 0979b5b19..7c5bab673 100644 --- a/src/dotty/tools/dotc/reporting/Reporter.scala +++ b/src/dotty/tools/dotc/reporting/Reporter.scala @@ -74,9 +74,9 @@ trait Reporting { this: Context => /** For sending messages that are printed only if -verbose is set */ def inform(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = - if (this.settings.verbose.value) echo(msg, pos) + if (this.settings.verbose.value) this.println(msg, pos) - def echo(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = + def println(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = reporter.report(new Info(msg, pos)) def deprecationWarning(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = @@ -112,7 +112,7 @@ trait Reporting { this: Context => */ def log(msg: => String, pos: SourcePosition = NoSourcePosition): Unit = if (this.settings.log.value.containsPhase(phase)) - echo(s"[log ${ctx.phasesStack.reverse.mkString(" -> ")}] $msg", pos) + this.println(s"[log ${ctx.phasesStack.reverse.mkString(" -> ")}] $msg", pos) def debuglog(msg: => String): Unit = if (ctx.debug) log(msg) @@ -232,10 +232,10 @@ abstract class Reporter { /** Print a summary */ def printSummary(implicit ctx: Context): Unit = { - if (warningCount > 0) ctx.echo(countString(warningCount, "warning") + " found") - if (errorCount > 0) ctx.echo(countString(errorCount, "error") + " found") + if (warningCount > 0) ctx.println(countString(warningCount, "warning") + " found") + if (errorCount > 0) ctx.println(countString(errorCount, "error") + " found") for ((settingName, count) <- unreportedWarnings) - ctx.echo(s"there were $count ${settingName.tail} warning(s); re-run with $settingName for details") + ctx.println(s"there were $count ${settingName.tail} warning(s); re-run with $settingName for details") } /** Returns a string meaning "n elements". */ |