From 66a176bea94205469851fdb4fab46c2589fba407 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 23 Aug 2013 16:13:15 +0200 Subject: Fix in printer NamedTypes need not have an existing symbol, so one should print the name in the type instead. --- src/dotty/tools/dotc/printing/PlainPrinter.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/printing') diff --git a/src/dotty/tools/dotc/printing/PlainPrinter.scala b/src/dotty/tools/dotc/printing/PlainPrinter.scala index f2ddae42f..8dedecbb7 100644 --- a/src/dotty/tools/dotc/printing/PlainPrinter.scala +++ b/src/dotty/tools/dotc/printing/PlainPrinter.scala @@ -97,7 +97,7 @@ class PlainPrinter(_ctx: Context) extends Printer { if (pre.lastLine.endsWith(".")) pre ~ "type" else fullNameString(tp.typeSymbol.skipPackageObject) ~ ".type" case TypeRef(pre, name) => - toTextPrefix(pre) ~ nameString(tp.typeSymbol) + toTextPrefix(pre) ~ nameString(name) case tp: RefinedType => // return tp.toString // !!! DEBUG val parent :: (refined: List[RefinedType]) = @@ -171,7 +171,7 @@ class PlainPrinter(_ctx: Context) extends Printer { protected def toTextPrefix(tp: Type): Text = controlled { tp match { case tp @ TermRef(pre, name) => - toTextPrefix(pre) ~ nameString(tp.symbol) ~ "." + toTextPrefix(pre) ~ nameString(name) ~ "." case ThisType(cls) => nameString(cls) + ".this." case SuperType(thistpe, _) => -- cgit v1.2.3