Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions compiler/src/dotty/tools/dotc/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -891,15 +891,6 @@ trait Applications extends Compatibility {
then originalProto.tupledDual
else originalProto

// If some of the application's arguments are function literals without explicitly declared
// parameter types, relate the normalized result type of the application with the
// expected type through `constrainResult`. This can add more constraints which
// help sharpen the inferred parameter types for the argument function literal(s).
// This tweak is needed to make i1378 compile.
if (tree.args.exists(untpd.isFunctionWithUnknownParamType(_)))
if (!constrainResult(tree.symbol, fun1.tpe.widen, proto.derivedFunProto(resultType = pt)))
typr.println(i"result failure for $tree with type ${fun1.tpe.widen}, expected = $pt")

/** Type application where arguments come from prototype, and no implicits are inserted */
def simpleApply(fun1: Tree, proto: FunProto)(using Context): Tree =
methPart(fun1).tpe match {
Expand Down