aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/ProtoTypes.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-16 15:21:12 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-16 15:21:21 +0200
commit0eb2d76c467a53786ae6147c9c983c23ab0894c8 (patch)
tree44db7e49882c87f2906d6d21dca564c0d5407d38 /src/dotty/tools/dotc/typer/ProtoTypes.scala
parentbd45ecc06b04c3788d1ce706508eed5e0c50b50b (diff)
downloaddotty-0eb2d76c467a53786ae6147c9c983c23ab0894c8.tar.gz
dotty-0eb2d76c467a53786ae6147c9c983c23ab0894c8.tar.bz2
dotty-0eb2d76c467a53786ae6147c9c983c23ab0894c8.zip
Proparage function result constrains when inferring parameter types
If an application has functions with implicit parameter types we need to be more aggressive about propagating knowledge of the expected result type into the constraint. Fixes #1378.
Diffstat (limited to 'src/dotty/tools/dotc/typer/ProtoTypes.scala')
-rw-r--r--src/dotty/tools/dotc/typer/ProtoTypes.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/ProtoTypes.scala b/src/dotty/tools/dotc/typer/ProtoTypes.scala
index a430d5f75..767ccbe7d 100644
--- a/src/dotty/tools/dotc/typer/ProtoTypes.scala
+++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -175,7 +175,7 @@ object ProtoTypes {
def isMatchedBy(tp: Type)(implicit ctx: Context) =
typer.isApplicable(tp, Nil, typedArgs, resultType)
- def derivedFunProto(args: List[untpd.Tree], resultType: Type, typer: Typer) =
+ def derivedFunProto(args: List[untpd.Tree] = this.args, resultType: Type, typer: Typer = this.typer) =
if ((args eq this.args) && (resultType eq this.resultType) && (typer eq this.typer)) this
else new FunProto(args, resultType, typer)