aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/ProtoTypes.scala
diff options
context:
space:
mode:
authorNicolas Stucki <nicolas.stucki@gmail.com>2016-10-11 10:47:42 +0200
committerNicolas Stucki <nicolas.stucki@gmail.com>2016-10-11 10:52:34 +0200
commit13c5c28671cb8b61fd28661629e88e24f3b92faf (patch)
treec22ec0ea9fa425f3b3d7b852a67ec2631a7a968c /src/dotty/tools/dotc/typer/ProtoTypes.scala
parent618cebbec6fd5727b51974fa372ae984c03f9f99 (diff)
downloaddotty-13c5c28671cb8b61fd28661629e88e24f3b92faf.tar.gz
dotty-13c5c28671cb8b61fd28661629e88e24f3b92faf.tar.bz2
dotty-13c5c28671cb8b61fd28661629e88e24f3b92faf.zip
Fix #1543: Ignore IgnoredProto when normalizing method application.
Diffstat (limited to 'src/dotty/tools/dotc/typer/ProtoTypes.scala')
-rw-r--r--src/dotty/tools/dotc/typer/ProtoTypes.scala7
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 0e6697fb7..751ed928b 100644
--- a/src/dotty/tools/dotc/typer/ProtoTypes.scala
+++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -395,9 +395,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
}