aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/printing
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-23 16:13:15 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-23 16:13:15 +0200
commit66a176bea94205469851fdb4fab46c2589fba407 (patch)
tree7229a12b7d1b5d7a1e1c3b93500e2b90f5312b96 /src/dotty/tools/dotc/printing
parent8d4a02f4e7d88f94d4ffddce90fcfb61af5184a5 (diff)
downloaddotty-66a176bea94205469851fdb4fab46c2589fba407.tar.gz
dotty-66a176bea94205469851fdb4fab46c2589fba407.tar.bz2
dotty-66a176bea94205469851fdb4fab46c2589fba407.zip
Fix in printer
NamedTypes need not have an existing symbol, so one should print the name in the type instead.
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r--src/dotty/tools/dotc/printing/PlainPrinter.scala4
1 files changed, 2 insertions, 2 deletions
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, _) =>