aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-03 15:27:28 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-03 15:27:28 +0100
commitc81a21a8ecc690813bbe4eaece0640f262434f84 (patch)
treec1026200f6bac0cf9894a45cda471bdc37a5f687
parent62a935f3222eea1d7a08b788b9745c4e99f440f9 (diff)
downloaddotty-c81a21a8ecc690813bbe4eaece0640f262434f84.tar.gz
dotty-c81a21a8ecc690813bbe4eaece0640f262434f84.tar.bz2
dotty-c81a21a8ecc690813bbe4eaece0640f262434f84.zip
Don't print module class suffix in refined printer.
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index 52006bd74..cda753d3a 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -33,11 +33,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
override def nameString(name: Name): String = name.decode.toString
- override protected def simpleNameString(sym: Symbol): String = {
- var name = sym.originalName
- //if (sym is ModuleClass) name = name.stripModuleClassSuffix
- name.decode.toString
- }
+ override protected def simpleNameString(sym: Symbol): String =
+ sym.originalName.decode.toString
override protected def fullNameOwner(sym: Symbol) = {
val owner = super.fullNameOwner(sym)
@@ -94,7 +91,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
tp match {
case tp: RefinedType =>
val args = tp.typeArgs
- if (args.nonEmpty) {
+ if (args.nonEmpty && (args forall (_.exists))) {
val tycon = tp.unrefine
val cls = tycon.typeSymbol
if (cls.typeParams.length == args.length) {