Skip to content

Commit 00de2f8

Browse files
committed
Print max constraint under -Ydetailed-stats
1 parent c7ee07c commit 00de2f8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package dotty.tools.dotc
22
package core
33

44
import Contexts._
5-
import config.Printers.typr
5+
import config.Printers.{default, typr}
66

77
trait ConstraintRunInfo { self: Run =>
88
private[this] var maxSize = 0
@@ -12,8 +12,9 @@ trait ConstraintRunInfo { self: Run =>
1212
maxSize = size
1313
maxConstraint = c
1414
}
15-
def printMaxConstraint()(implicit ctx: Context) =
16-
if (maxSize > 0) typr.println(s"max constraint = ${maxConstraint.show}")
17-
15+
def printMaxConstraint()(implicit ctx: Context) = {
16+
val printer = if (ctx.settings.YdetailedStats.value) default else typr
17+
if (maxSize > 0) printer.println(s"max constraint = ${maxConstraint.show}")
18+
}
1819
protected def reset() = maxConstraint = null
1920
}

0 commit comments

Comments
 (0)