Skip to content

Commit db67334

Browse files
committed
cleaned up
1 parent b6b51a3 commit db67334

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,12 +1926,11 @@ trait Applications extends Compatibility {
19261926
else resolve(alts)
19271927
end resolveOverloaded
19281928

1929-
def isApplicableTerm(argTypes: List[Type], resultType: Type, argMatch: ArgMatch = ArgMatch.CompatibleCAP)(using Context) : TermRef => Boolean = {
1930-
case expr: TermRef if expr.widenSingleton.isInstanceOf[ExprType | AppliedType] =>
1929+
def isApplicableTerm(argTypes: List[Type], resultType: Type, argMatch: ArgMatch = ArgMatch.CompatibleCAP)(using Context) : TermRef => Boolean = expr => expr.widen match
1930+
case _: ExprType | _: AppliedType =>
19311931
isApplicableType(expr, argTypes, resultType)
1932-
case alt =>
1933-
isApplicableMethodRef(alt, argTypes, resultType, argMatch)
1934-
}
1932+
case _ =>
1933+
isApplicableMethodRef(expr, argTypes, resultType, argMatch)
19351934

19361935
/** This private version of `resolveOverloaded` does the bulk of the work of
19371936
* overloading resolution, but does neither result adaptation nor apply insertion.

0 commit comments

Comments
 (0)