File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,11 @@ object Capabilities:
205205 hiddenSet.adoptClassifier(cls)
206206 if freeze then isClassified = true
207207
208+ def ccOwnerStr (using Context ): String =
209+ val owner = ccOwner
210+ if owner.name == nme.SKOLEM then i " a new instance of ${hiddenSet.owner}"
211+ else owner.show
212+
208213 def descr (using Context ) =
209214 val originStr = origin match
210215 case Origin .InDecl (sym) if sym.exists =>
Original file line number Diff line number Diff line change @@ -492,11 +492,13 @@ class PlainPrinter(_ctx: Context) extends Printer {
492492 if c.hiddenSet.classifier == defn.AnyClass then " "
493493 else s " classified as ${c.hiddenSet.classifier.name.show}"
494494 def prefixTxt : Text = c.prefix match
495- case NoPrefix | _ : ThisType => " "
495+ case NoPrefix => " "
496+ case _ : ThisType if ! ccVerbose => " "
497+ case pre : TermRef if ! ccVerbose && pre.name == nme.SKOLEM => " "
496498 case pre : SingletonType => toTextRef(pre) ~ " ."
497499 case pre => toText(pre) ~ " ."
498500 def core : Text =
499- if ccVerbose then s " <fresh $idStr in ${c.ccOwner } hiding " ~ toTextCaptureSet(c.hiddenSet) ~ classified ~ " >"
501+ if ccVerbose then s " <fresh $idStr in ${c.ccOwnerStr } hiding " ~ toTextCaptureSet(c.hiddenSet) ~ classified ~ " >"
500502 else " cap"
501503 prefixTxt ~ core
502504 case tp : TypeProxy =>
You can’t perform that action at this time.
0 commit comments