File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/printing Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,12 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
170170 case tp : TypeRef =>
171171 if (tp.symbol.isAnonymousClass && ! ctx.settings.uniqid.value)
172172 return toText(tp.info)
173+ if (tp.symbol.is(Param ))
174+ tp.prefix match {
175+ case pre : ThisType if pre.cls == tp.symbol.owner =>
176+ return nameString(tp.symbol)
177+ case _ =>
178+ }
173179 case ExprType (result) =>
174180 return " => " ~ toText(result)
175181 case ErasedValueType (tycon, underlying) =>
@@ -501,7 +507,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
501507 typeDefText(tparamsTxt, toText(rhs))
502508 case LambdaTypeTree (tparams, body) =>
503509 recur(body, tparamsText(tparams))
504- case rhs : TypeTree if rhs.tpe .isInstanceOf [TypeBounds ] =>
510+ case rhs : TypeTree if rhs.typeOpt .isInstanceOf [TypeBounds ] =>
505511 typeDefText(tparamsTxt, toText(rhs))
506512 case rhs =>
507513 typeDefText(tparamsTxt, optText(rhs)(" = " ~ _))
You can’t perform that action at this time.
0 commit comments