diff options
-rw-r--r-- | src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala | 8 | ||||
-rw-r--r-- | test/files/scalap/typeAnnotations/result.test | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala index 0d532b9e85..28b3094035 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala @@ -292,7 +292,6 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { buffer.append(valueToString(attrib.value)) buffer.append(" }") } - buffer.append(" ") buffer.toString } @@ -373,8 +372,11 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { def getVariance(t: TypeSymbol) = if (t.isCovariant) "+" else if (t.isContravariant) "-" else "" def toString(symbol: Symbol): String = symbol match { - case symbol: TypeSymbol => (for (a <- symbol.attributes) yield toString(a)).mkString("") + - getVariance(symbol) + processName(symbol.name) + toString(symbol.infoType) + case symbol: TypeSymbol => { + val attrs = (for (a <- symbol.attributes) yield toString(a)).mkString(" ") + val atrs = if (attrs.length > 0) attrs.trim + " " else "" + atrs + getVariance(symbol) + processName(symbol.name) + toString(symbol.infoType) + } case s => symbol.toString } diff --git a/test/files/scalap/typeAnnotations/result.test b/test/files/scalap/typeAnnotations/result.test index eed2e68eb0..b565d6185b 100644 --- a/test/files/scalap/typeAnnotations/result.test +++ b/test/files/scalap/typeAnnotations/result.test @@ -2,7 +2,7 @@ abstract class TypeAnnotations[@scala.specialized R] extends java.lang.Object wi def this() = { /* compiled code */ } @scala.specialized val x : scala.Int = { /* compiled code */ } - @scala.specialized + @scala.specialized type T def compose[@scala.specialized A](x : A, y : R) : A = { /* compiled code */ } }
\ No newline at end of file |