File tree 1 file changed +12
-11
lines changed
src/dotty/tools/dotc/reporting 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -149,18 +149,19 @@ trait Reporting { this: Context =>
149
149
else traceIndented[T ](s " ==> $question? " , (res : Any ) => s " <== $question = ${resStr(res)}" )(op)
150
150
}
151
151
152
- def traceIndented [T ](leading : => String , trailing : Any => String )(op : => T ): T = {
153
- var finalized = false
154
- var logctx = this
155
- while (logctx.reporter.isInstanceOf [StoreReporter ]) logctx = logctx.outer
156
- def finalize (result : Any , note : String ) =
157
- if (! finalized) {
158
- base.indent -= 1
159
- logctx.log(s " ${base.indentTab * base.indent}${trailing(result)}$note" )
160
- finalized = true
161
- }
152
+ def traceIndented [T ](leading : => String , trailing : Any => String )(op : => T ): T =
162
153
if (ctx.mode.is(Mode .Printing )) op
163
- else try {
154
+ else {
155
+ var finalized = false
156
+ var logctx = this
157
+ while (logctx.reporter.isInstanceOf [StoreReporter ]) logctx = logctx.outer
158
+ def finalize (result : Any , note : String ) =
159
+ if (! finalized) {
160
+ base.indent -= 1
161
+ logctx.log(s " ${base.indentTab * base.indent}${trailing(result)}$note" )
162
+ finalized = true
163
+ }
164
+ try {
164
165
logctx.log(s " ${base.indentTab * base.indent}$leading" )
165
166
base.indent += 1
166
167
val res = op
You can’t perform that action at this time.
0 commit comments