diff --git a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala index 7904a3d63ac4..01100e2434b0 100644 --- a/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -192,10 +192,11 @@ class PlainPrinter(_ctx: Context) extends Printer { case tp: TermRef if tp.denot.isOverloaded => "" case tp: TypeRef => + val dealisedType = selectionString(tp.dealias.asInstanceOf[NamedType]) if (printWithoutPrefix.contains(tp.symbol)) - selectionString(tp.dealias.asInstanceOf[NamedType]) + dealisedType else - toTextPrefixOf(tp) ~ selectionString(tp) + toTextPrefixOf(tp) ~ dealisedType case tp: TermParamRef => ParamRefNameString(tp) ~ lambdaHash(tp.binder) ~ ".type" case tp: TypeParamRef =>