diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-06 14:34:23 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-06 14:34:23 +0000 |
commit | 64660068dd89813c7c7a09db1e783177ac31f158 (patch) | |
tree | 7190751d612160c48b1ca5c772929110db772f3e /src | |
parent | bc9a3475f308e78de193e4072f11e2edb7f7a72b (diff) | |
download | scala-64660068dd89813c7c7a09db1e783177ac31f158.tar.gz scala-64660068dd89813c7c7a09db1e783177ac31f158.tar.bz2 scala-64660068dd89813c7c7a09db1e783177ac31f158.zip |
Another corner involving generic signatures and...
Another corner involving generic signatures and java interop flushed out
by seth tisue. Keep that detector fired up seth or the rebel alliance
will surely be crushed. (In fact, I nominate you to write a test suite!)
Closes #4317, no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Erasure.scala | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index dcc6ab044c..dad422a4a9 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -326,8 +326,13 @@ abstract class Erasure extends AddInterfaces val paramString = if (toplevel) tparams map paramSig mkString ("<", "", ">") else "" paramString + jsig(restpe) case MethodType(params, restpe) => - "("+(params map (_.tpe) map jsig).mkString+")"+ - (if (restpe.typeSymbol == UnitClass || sym0.isConstructor) VOID_TAG.toString else jsig(restpe)) + val ressym = restpe.typeSymbol + "(%s)%s".format( + params map (x => jsig(x.tpe)) mkString, + if (ressym == UnitClass || sym0.isConstructor) VOID_TAG + else if (isValueClass(ressym)) abbrvTag(ressym) + else jsig(restpe) + ) case RefinedType(parent :: _, decls) => jsig(parent) case ClassInfoType(parents, _, _) => |