Skip to content

Commit

Permalink
Trial: Improved narrowing for overloading resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Apr 4, 2024
1 parent 8eeee0b commit 714c774
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/typer/Applications.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2219,11 +2219,11 @@ trait Applications extends Compatibility {
deepPt match
case pt @ FunProto(_, PolyProto(targs, resType)) =>
// try to narrow further with snd argument list and following type params
resolveMapped(candidates,
resolveMapped(found,
skipParamClause(pt.typedArgs().tpes, targs.tpes), resType)
case pt @ FunProto(_, resType: FunOrPolyProto) =>
// try to narrow further with snd argument list
resolveMapped(candidates,
resolveMapped(found,
skipParamClause(pt.typedArgs().tpes, Nil), resType)
case _ =>
// prefer alternatives that need no eta expansion
Expand All @@ -2245,7 +2245,7 @@ trait Applications extends Compatibility {
// try again with a deeper known expected type
resolveOverloaded1(alts, deepPt)
else
candidates
found
}
end resolveOverloaded1

Expand Down

0 comments on commit 714c774

Please sign in to comment.