From 70e785f5d8a583dae127dadf4d9add70bdea71f7 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 18 May 2014 16:36:20 +0200 Subject: Simplify result handling in FunProto. Following the example of SelectionProto, we now always hide the result in a FunProto behind an IgnoreProto. This avoids a special case retry with a weaker FunProto in tryInsertApplyOrImplicit. --- src/dotty/tools/dotc/typer/Applications.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/typer/Applications.scala') diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 023063585..aaceac0e0 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -441,7 +441,7 @@ trait Applications extends Compatibility { self: Typer => def typedApply(tree: untpd.Apply, pt: Type)(implicit ctx: Context): Tree = { def realApply(implicit ctx: Context): Tree = track("realApply") { - var proto = new FunProto(tree.args, ignoreIfProto(pt), this) + var proto = new FunProto(tree.args, IgnoredProto(pt), this) val fun1 = typedExpr(tree.fun, proto) // Warning: The following line is dirty and fragile. We record that auto-tupling was demanded as @@ -461,7 +461,7 @@ trait Applications extends Compatibility { self: Typer => val result = app.result ConstFold(result) } { (failedVal, failedState) => - val fun2 = tryInsertImplicits(fun1, proto) + val fun2 = tryInsertImplicitOnQualifier(fun1, proto) if (fun1 eq fun2) { failedState.commit() failedVal -- cgit v1.2.3