@@ -1944,12 +1944,18 @@ trait Applications extends Compatibility {
1944
1944
end resolveOverloaded
1945
1945
1946
1946
def isApplicableTerm (argTypes : List [Type ], resultType : Type , argMatch : ArgMatch )(using Context ): TermRef => Boolean =
1947
- onMethod(_, argTypes.nonEmpty):
1948
- isApplicableMethodRef(_, argTypes, resultType, argMatch)
1947
+ term => term.widen match
1948
+ case _ : AppliedType =>
1949
+ isApplicableType(term, argTypes, resultType)
1950
+ case _ =>
1951
+ isApplicableMethodRef(term, argTypes, resultType, argMatch)
1949
1952
1950
1953
def isApplicableTerm (argTypes : List [Tree ], resultType : Type , keepConstraint : Boolean , argMatch : ArgMatch )(using Context ): TermRef => Boolean =
1951
- onMethod(_, argTypes.nonEmpty):
1952
- isApplicableMethodRef(_, argTypes, resultType, keepConstraint, argMatch)
1954
+ term => term.widen match
1955
+ case _ : AppliedType =>
1956
+ isApplicableType(term, argTypes, resultType, keepConstraint)
1957
+ case _ =>
1958
+ isApplicableMethodRef(term, argTypes, resultType, keepConstraint, argMatch)
1953
1959
1954
1960
1955
1961
/** This private version of `resolveOverloaded` does the bulk of the work of
0 commit comments