aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-29 13:08:53 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-01 15:04:45 +0200
commite4dc4fabd3e34e96ce60311b60219fa8c0064bc2 (patch)
tree62e5bf5629469bd075988bf669efde37dfe61680 /src
parent71067e64900b212068328d114edc741c6e12049b (diff)
downloaddotty-e4dc4fabd3e34e96ce60311b60219fa8c0064bc2.tar.gz
dotty-e4dc4fabd3e34e96ce60311b60219fa8c0064bc2.tar.bz2
dotty-e4dc4fabd3e34e96ce60311b60219fa8c0064bc2.zip
Make memberSignature work after erasure.
Erasure uncurries arguments, need to track that in memberSignature.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/transform/FullParameterization.scala12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/transform/FullParameterization.scala b/src/dotty/tools/dotc/transform/FullParameterization.scala
index 6389f981e..e9057e885 100644
--- a/src/dotty/tools/dotc/transform/FullParameterization.scala
+++ b/src/dotty/tools/dotc/transform/FullParameterization.scala
@@ -226,12 +226,18 @@ trait FullParameterization {
}
object FullParameterization {
+
/** Assuming `info` is a result of a `fullyParameterizedType` call, the signature of the
* original method type `X` such that `info = fullyParameterizedType(X, ...)`.
*/
def memberSignature(info: Type)(implicit ctx: Context): Signature = info match {
- case info: PolyType => memberSignature(info.resultType)
- case info @ MethodType(nme.SELF :: Nil, _) => info.resultType.ensureMethodic.signature
- case _ => Signature.NotAMethod
+ case info: PolyType =>
+ memberSignature(info.resultType)
+ case info @ MethodType(nme.SELF :: Nil, _) =>
+ info.resultType.ensureMethodic.signature
+ case info @ MethodType(nme.SELF :: otherNames, thisType :: otherTypes) =>
+ info.derivedMethodType(otherNames, otherTypes, info.resultType).signature
+ case _ =>
+ Signature.NotAMethod
}
}