Skip to content

Commit 9153fe5

Browse files
authored
Merge pull request #13742 from dotty-staging/less-constrainResult
Remove unnecessary call to constrainResult
2 parents 8ee672c + fccae2b commit 9153fe5

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -891,15 +891,6 @@ trait Applications extends Compatibility {
891891
then originalProto.tupledDual
892892
else originalProto
893893

894-
// If some of the application's arguments are function literals without explicitly declared
895-
// parameter types, relate the normalized result type of the application with the
896-
// expected type through `constrainResult`. This can add more constraints which
897-
// help sharpen the inferred parameter types for the argument function literal(s).
898-
// This tweak is needed to make i1378 compile.
899-
if (tree.args.exists(untpd.isFunctionWithUnknownParamType(_)))
900-
if (!constrainResult(tree.symbol, fun1.tpe.widen, proto.derivedFunProto(resultType = pt)))
901-
typr.println(i"result failure for $tree with type ${fun1.tpe.widen}, expected = $pt")
902-
903894
/** Type application where arguments come from prototype, and no implicits are inserted */
904895
def simpleApply(fun1: Tree, proto: FunProto)(using Context): Tree =
905896
methPart(fun1).tpe match {

0 commit comments

Comments
 (0)