File tree 1 file changed +7
-8
lines changed
compiler/src/dotty/tools/dotc/cc
1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -158,14 +158,13 @@ sealed abstract class CaptureSet extends Showable:
158
158
* as frozen.
159
159
*/
160
160
def accountsFor (x : CaptureRef )(using Context ): Boolean =
161
- if comparer.isInstanceOf [ExplainingTypeComparer ] then // !!! DEBUG
162
- reporting.trace.force(i " $this accountsFor $x, ${x.captureSetOfInfo}? " , show = true ):
163
- elems.exists(_.subsumes(x))
164
- || ! x.isMaxCapability && x.captureSetOfInfo.subCaptures(this , frozen = true ).isOK
165
- else
166
- reporting.trace(i " $this accountsFor $x, ${x.captureSetOfInfo}? " , show = true ):
167
- elems.exists(_.subsumes(x))
168
- || ! x.isMaxCapability && x.captureSetOfInfo.subCaptures(this , frozen = true ).isOK
161
+ def debugInfo (using Context ) = i " $this accountsFor $x, which has capture set ${x.captureSetOfInfo}"
162
+ def test (using Context ) = reporting.trace(debugInfo):
163
+ elems.exists(_.subsumes(x))
164
+ || ! x.isMaxCapability && x.captureSetOfInfo.subCaptures(this , frozen = true ).isOK
165
+ comparer match
166
+ case comparer : ExplainingTypeComparer => comparer.traceIndented(debugInfo)(test)
167
+ case _ => test
169
168
170
169
/** A more optimistic version of accountsFor, which does not take variable supersets
171
170
* of the `x` reference into account. A set might account for `x` if it accounts
You can’t perform that action at this time.
0 commit comments