diff options
author | Martin Odersky <odersky@gmail.com> | 2013-08-14 16:07:59 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-08-14 16:07:59 +0200 |
commit | f19250b1a123aa63cf8f14096bfd8e29e7e548b2 (patch) | |
tree | a676a2d5c8e3dc494c4736c9d1454294b9b10341 /src/dotty/tools/dotc/printing | |
parent | c6f0c00790c996bea57ea905a830dedcb4f2bb44 (diff) | |
download | dotty-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.scala | 13 |
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 = |