diff options
-rw-r--r-- | src/dotty/tools/dotc/transform/FullParameterization.scala | 12 |
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 } } |