Skip to content

Commit eb22d15

Browse files
committed
Clean up tries in typedApply
1 parent 75f4400 commit eb22d15

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -601,16 +601,16 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
601601
case _ =>
602602
tryEither {
603603
implicit ctx => simpleApply(fun1, proto)
604-
} {
605-
(failedVal, failedState) =>
606-
def fail = { failedState.commit(); failedVal }
607-
// Try once with original prototype and once (if different) with tupled one.
608-
// The reason we need to try both is that the decision whether to use tupled
609-
// or not was already taken but might have to be revised when an implicit
610-
// is inserted on the qualifier.
611-
tryWithImplicitOnQualifier(fun1, originalProto).getOrElse(
612-
if (proto eq originalProto) fail
613-
else tryWithImplicitOnQualifier(fun1, proto).getOrElse(fail))
604+
} { (failedVal, failedState) =>
605+
def fail = { failedState.commit(); failedVal }
606+
// Try once with original prototype and once (if different) with tupled one.
607+
// The reason we need to try both is that the decision whether to use tupled
608+
// or not was already taken but might have to be revised when an implicit
609+
// is inserted on the qualifier.
610+
tryWithImplicitOnQualifier(fun1, originalProto) getOrElse {
611+
if (proto eq originalProto) fail
612+
else tryWithImplicitOnQualifier(fun1, proto).getOrElse(fail)
613+
}
614614
}
615615
}
616616
}

0 commit comments

Comments
 (0)