aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/printing
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-14 16:07:59 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-14 16:07:59 +0200
commitf19250b1a123aa63cf8f14096bfd8e29e7e548b2 (patch)
treea676a2d5c8e3dc494c4736c9d1454294b9b10341 /src/dotty/tools/dotc/printing
parentc6f0c00790c996bea57ea905a830dedcb4f2bb44 (diff)
downloaddotty-f19250b1a123aa63cf8f14096bfd8e29e7e548b2.tar.gz
dotty-f19250b1a123aa63cf8f14096bfd8e29e7e548b2.tar.bz2
dotty-f19250b1a123aa63cf8f14096bfd8e29e7e548b2.zip
Integrated parser/typer into compiler
Some initial bug fixes. Added -explaintypes diagnostics.
Diffstat (limited to 'src/dotty/tools/dotc/printing')
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index 75b3db186..87441f7b7 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -54,11 +54,14 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
super.toTextPrefix(tp)
}
- override protected def refinementNameString(tp: RefinedType): String = {
- val tsym = tp.member(tp.refinedName).symbol
- val name = tsym.originalName
- nameString(if (tsym is ExpandedTypeParam) name.asTypeName.unexpandedName() else name)
- }
+ override protected def refinementNameString(tp: RefinedType): String =
+ if (tp.parent.isInstanceOf[WildcardType] || tp.refinedName == nme.WILDCARD)
+ super.refinementNameString(tp)
+ else {
+ val tsym = tp.member(tp.refinedName).symbol
+ val name = tsym.originalName
+ nameString(if (tsym is ExpandedTypeParam) name.asTypeName.unexpandedName() else name)
+ }
override def toText(tp: Type): Text = controlled {
def toTextTuple(args: List[Type]): Text =