diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-07-23 09:56:24 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-07-23 10:07:13 +0200 |
commit | 926585a3f36f35c9afc3f9ed9fe0ded72f6b7014 (patch) | |
tree | 75bf522accac99be17ac4b1460e0a1e58ddaa86d /src/reflect/scala | |
parent | 73fb460c1cd20ee97556ec0867d17efaa795d129 (diff) | |
download | scala-926585a3f36f35c9afc3f9ed9fe0ded72f6b7014.tar.gz scala-926585a3f36f35c9afc3f9ed9fe0ded72f6b7014.tar.bz2 scala-926585a3f36f35c9afc3f9ed9fe0ded72f6b7014.zip |
SI-8743 Fix crasher with poly-methods annotated with @varargs
The code that generated the Java varargs forwarder was basing
things on the `ValDef-s` of the parameters of the source method.
But, their types refer to a type parameter skolems of the enclosing
method, which led to a type mismatch when typechecking the forwarder.
Instead, I've reworked the code to simply use the `DefDef`-s symbol's
info, which *doesn't* refer to skolems. This actually simplifies the
surrounding code somewhat; rather than repeated symbols in a map
we can just time travel the pre-uncurry method signatures to figure
out which params are releated.
Diffstat (limited to 'src/reflect/scala')
-rw-r--r-- | src/reflect/scala/reflect/internal/TreeInfo.scala | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/reflect/scala/reflect/internal/TreeInfo.scala b/src/reflect/scala/reflect/internal/TreeInfo.scala index b7d7d4df88..c521277f69 100644 --- a/src/reflect/scala/reflect/internal/TreeInfo.scala +++ b/src/reflect/scala/reflect/internal/TreeInfo.scala @@ -509,13 +509,6 @@ abstract class TreeInfo { case _ => false } - /** The parameter ValDefs of a method definition that have vararg types of the form T* - */ - def repeatedParams(tree: Tree): List[ValDef] = tree match { - case DefDef(_, _, _, vparamss, _, _) => vparamss.flatten filter (vd => isRepeatedParamType(vd.tpt)) - case _ => Nil - } - /** Is tpt a by-name parameter type of the form => T? */ def isByNameParamType(tpt: Tree) = tpt match { case TypeTree() => definitions.isByNameParamType(tpt.tpe) |