aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-10-30 16:20:57 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-11-22 20:10:20 +0100
commit11449db93f426a3fc64eded180852661d889804e (patch)
tree0add44f1650789ceac91906a7447c61d3b1828c3 /src/dotty/tools/dotc/typer/Applications.scala
parent68dfe2a7619edfb9829876643c9177723a40bb84 (diff)
downloaddotty-11449db93f426a3fc64eded180852661d889804e.tar.gz
dotty-11449db93f426a3fc64eded180852661d889804e.tar.bz2
dotty-11449db93f426a3fc64eded180852661d889804e.zip
Infer if overloading resolution should trigger implicit search.
This doesn't require additional argument. Decision can be made solely from the phaseId.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index 3fd56640e..9b2e64f35 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -902,7 +902,7 @@ trait Applications extends Compatibility { self: Typer =>
* to form the method type.
* todo: use techniques like for implicits to pick candidates quickly?
*/
- def resolveOverloaded(alts: List[TermRef], pt: Type, targs: List[Type] = Nil, resolveImplicits: Boolean = true)(implicit ctx: Context): List[TermRef] = track("resolveOverloaded") {
+ def resolveOverloaded(alts: List[TermRef], pt: Type, targs: List[Type] = Nil)(implicit ctx: Context): List[TermRef] = track("resolveOverloaded") {
def isDetermined(alts: List[TermRef]) = alts.isEmpty || alts.tail.isEmpty
@@ -965,7 +965,7 @@ trait Applications extends Compatibility { self: Typer =>
def narrowByTrees(alts: List[TermRef], args: List[Tree], resultType: Type): List[TermRef] =
alts filter ( alt =>
- if (resolveImplicits) isApplicable(alt, targs, args, resultType)
+ if (!ctx.isAfterTyper) isApplicable(alt, targs, args, resultType)
else isDirectlyApplicable(alt, targs, args, resultType)
)