@@ -76,6 +76,8 @@ object Message:
76
76
/** If false, stop all recordings */
77
77
private var disambi = disambiguate
78
78
79
+ def isActive = disambi != Disambiguation .None
80
+
79
81
/** Clear all entries and stop further entries to be added */
80
82
def disable () =
81
83
seen.clear()
@@ -266,20 +268,20 @@ object Message:
266
268
case _ => super .toTextRef(tp)
267
269
268
270
override def toTextCaptureRef (tp : Type ): Text = tp match
269
- case tp : CaptureRef if tp.isRootCapability && ! tp.isReadOnly =>
271
+ case tp : CaptureRef if tp.isRootCapability && ! tp.isReadOnly && seen.isActive =>
270
272
seen.record(" cap" , isType = false , tp)
271
273
case _ => super .toTextCaptureRef(tp)
272
274
273
275
override def toTextCapturing (parent : Type , refs : GeneralCaptureSet , boxText : Text ) = refs match
274
276
case refs : CaptureSet
275
- if isUniversalCaptureSet(refs) && ! defn.isFunctionType(parent) && ! printDebug =>
277
+ if isUniversalCaptureSet(refs) && ! defn.isFunctionType(parent) && ! printDebug && seen.isActive =>
276
278
boxText ~ toTextLocal(parent) ~ seen.record(" ^" , isType = true , refs.elems.nth(0 ))
277
279
case _ =>
278
280
super .toTextCapturing(parent, refs, boxText)
279
281
280
282
override def funMiddleText (isContextual : Boolean , isPure : Boolean , refs : GeneralCaptureSet | Null ): Text =
281
283
refs match
282
- case refs : CaptureSet if isUniversalCaptureSet(refs) =>
284
+ case refs : CaptureSet if isUniversalCaptureSet(refs) && seen.isActive =>
283
285
seen.record(arrow(isContextual, isPure = false ), isType = true , refs.elems.nth(0 ))
284
286
case _ =>
285
287
super .funMiddleText(isContextual, isPure, refs)
0 commit comments