File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ trait ConstraintRunInfo { self: Run =>
1212 maxSize = size
1313 maxConstraint = c
1414 }
15- def printMaxConstraint ()(using Context ): Unit = {
16- val printer = if (ctx.settings.YdetailedStats .value) default else typr
17- if (maxSize > 0 ) printer.println(s " max constraint = ${maxConstraint.nn.show}" )
18- }
15+ def printMaxConstraint ()(using Context ): Unit =
16+ if maxSize > 0 then
17+ val printer = if ctx.settings.YdetailedStats .value then default else typr
18+ printer.println(s " max constraint size: $maxSize" )
19+ try printer.println(s " max constraint = ${maxConstraint.nn.show}" )
20+ catch case ex : StackOverflowError => printer.println(" max constraint cannot be printed due to stack overflow" )
21+
1922 protected def reset (): Unit = maxConstraint = null
2023}
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ import collection.mutable
5555 }
5656
5757 def maybeMonitored [T ](op : => T )(using Context ): T =
58- if (ctx.settings.YdetailedStats .value) {
58+ if (ctx.settings.YdetailedStats .value && hits.nonEmpty ) {
5959 monitored = true
6060 try op
6161 finally {
You can’t perform that action at this time.
0 commit comments