diff options
author | odersky <odersky@gmail.com> | 2016-10-13 19:55:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 19:55:42 +0200 |
commit | 6095454e05ba4446fca446c5b53e80180d69b127 (patch) | |
tree | cd2c84911bbbf49a33a27de5c444de48741508c4 /src | |
parent | 4f8a85c3f174a2fd04073475cef87691057af9bf (diff) | |
parent | 13c5c28671cb8b61fd28661629e88e24f3b92faf (diff) | |
download | dotty-6095454e05ba4446fca446c5b53e80180d69b127.tar.gz dotty-6095454e05ba4446fca446c5b53e80180d69b127.tar.bz2 dotty-6095454e05ba4446fca446c5b53e80180d69b127.zip |
Merge pull request #1577 from dotty-staging/fix-1543-2
Fix #1543: Ignore IgnoredProto when normalizing method application.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/typer/ProtoTypes.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/typer/ProtoTypes.scala b/src/dotty/tools/dotc/typer/ProtoTypes.scala index d451d6abd..08f566d49 100644 --- a/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -400,9 +400,10 @@ object ProtoTypes { if (mt.isDependent) tp else { val rt = normalize(mt.resultType, pt) - if (pt.isInstanceOf[ApplyingProto]) - mt.derivedMethodType(mt.paramNames, mt.paramTypes, rt) - else { + pt match { + case pt: IgnoredProto => mt + case pt: ApplyingProto => mt.derivedMethodType(mt.paramNames, mt.paramTypes, rt) + case _ => val ft = defn.FunctionOf(mt.paramTypes, rt) if (mt.paramTypes.nonEmpty || ft <:< pt) ft else rt } |