Skip to content

Commit efb4d7c

Browse files
committed
Improve verbose printing of capture sets
1 parent 3374d3a commit efb4d7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ class PlainPrinter(_ctx: Context) extends Printer {
171171
val core: Text =
172172
if !cs.isConst && cs.elems.isEmpty then "?"
173173
else "{" ~ Text(cs.processElems(_.toList.map(toTextCapability)), ", ") ~ "}"
174-
// ~ Str("?").provided(!cs.isConst)
174+
~ Str("?").provided(ccVerbose && !cs.isConst)
175+
~ Str(s"#${cs.asVar.id}").provided(showUniqueIds && !cs.isConst)
175176
core ~ cs.optionalInfo
176177

177178
private def toTextRetainedElem[T <: Untyped](ref: Tree[T]): Text = ref match

0 commit comments

Comments
 (0)