Skip to content

Commit 6a65c8e

Browse files
committed
use ctx.echo instead of println in TypeComparer.showGoal
1 parent 8943894 commit 6a65c8e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,8 +2201,7 @@ class TypeComparer(initctx: Context) extends ConstraintHandling[AbsentContext] w
22012201

22022202
/** Show subtype goal that led to an assertion failure */
22032203
def showGoal(tp1: Type, tp2: Type)(implicit ctx: Context): Unit = {
2204-
//TODO shouldn't this be a ctx.echo as well?
2205-
println(i"assertion failure for ${show(tp1)} <:< ${show(tp2)}, frozen = $frozenConstraint")
2204+
ctx.echo(i"assertion failure for ${show(tp1)} <:< ${show(tp2)}, frozen = $frozenConstraint")
22062205
def explainPoly(tp: Type) = tp match {
22072206
case tp: TypeParamRef => ctx.echo(s"TypeParamRef ${tp.show} found in ${tp.binder.show}")
22082207
case tp: TypeRef if tp.symbol.exists => ctx.echo(s"typeref ${tp.show} found in ${tp.symbol.owner.show}")

0 commit comments

Comments
 (0)