Skip to content

Commit d1ed1c5

Browse files
authored
Update compiler/src/dotty/tools/dotc/typer/Applications.scala
1 parent 632a066 commit d1ed1c5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,9 +1956,11 @@ trait Applications extends Compatibility {
19561956
}
19571957

19581958
def narrowByTypes(alts: List[TermRef], argTypes: List[Type], resultType: Type): List[TermRef] =
1959-
alts.filterConserve { alt =>
1960-
isApplicableMethodRef(alt, argTypes, resultType, ArgMatch.CompatibleCAP)
1961-
|| isApplicableType(alt, argTypes, resultType)
1959+
alts.filterConserve {
1960+
case expr: TermRef if expr.widenSingleton.isInstanceOf[ExprType] =>
1961+
isApplicableType(expr, argTypes, resultType)
1962+
case alt =>
1963+
isApplicableMethodRef(alt, argTypes, resultType, ArgMatch.CompatibleCAP)
19621964
}
19631965

19641966
/** Normalization steps before checking arguments:

0 commit comments

Comments
 (0)