File tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/printing
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) {
170
170
case tp : TypeRef =>
171
171
if (tp.symbol.isAnonymousClass && ! ctx.settings.uniqid.value)
172
172
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
+ }
173
179
case ExprType (result) =>
174
180
return " => " ~ toText(result)
175
181
case ErasedValueType (tycon, underlying) =>
@@ -501,7 +507,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
501
507
typeDefText(tparamsTxt, toText(rhs))
502
508
case LambdaTypeTree (tparams, body) =>
503
509
recur(body, tparamsText(tparams))
504
- case rhs : TypeTree if rhs.tpe .isInstanceOf [TypeBounds ] =>
510
+ case rhs : TypeTree if rhs.typeOpt .isInstanceOf [TypeBounds ] =>
505
511
typeDefText(tparamsTxt, toText(rhs))
506
512
case rhs =>
507
513
typeDefText(tparamsTxt, optText(rhs)(" = " ~ _))
You can’t perform that action at this time.
0 commit comments