diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-03 19:32:09 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-17 18:34:27 +0100 |
commit | 4fb19e43f696845a18cbe2a7671654674ffce9b7 (patch) | |
tree | eaa6abbcaf7966041f2e10f1d7840d4f4ca1c6a9 /compiler/src/dotty/tools/dotc/typer/Applications.scala | |
parent | ad7edc7bd8af963b768afdc50b7038a8daa47ccb (diff) | |
download | dotty-4fb19e43f696845a18cbe2a7671654674ffce9b7.tar.gz dotty-4fb19e43f696845a18cbe2a7671654674ffce9b7.tar.bz2 dotty-4fb19e43f696845a18cbe2a7671654674ffce9b7.zip |
Refactor function operations in Definitions
Also: show implicit function types correctly.
Also: refine applications of implicit funcitons
- don't do it for closure trees
- don't do it after typer.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Applications.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index 4203ab9b2..469d657a9 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -1294,7 +1294,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => val alts1 = alts filter pt.isMatchedBy resolveOverloaded(alts1, pt1, targs1) - case defn.FunctionOf(args, resultType) => + case defn.FunctionOf(args, resultType, _) => narrowByTypes(alts, args, resultType) case pt => @@ -1345,7 +1345,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic => // (p_1_1, ..., p_m_1) => r_1 // ... // (p_1_n, ..., p_m_n) => r_n - val decomposedFormalsForArg: List[Option[(List[Type], Type)]] = + val decomposedFormalsForArg: List[Option[(List[Type], Type, Boolean)]] = formalsForArg.map(defn.FunctionOf.unapply) if (decomposedFormalsForArg.forall(_.isDefined)) { val formalParamTypessForArg: List[List[Type]] = |