We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67c4247 commit 632a066Copy full SHA for 632a066
compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -1502,8 +1502,10 @@ trait Applications extends Compatibility {
1502
}
1503
1504
private def onMethod(tp: Type, followApply: Boolean)(p: TermRef => Boolean)(using Context): Boolean = tp match {
1505
+ case expr: TermRef if expr.widenSingleton.isInstanceOf[ExprType] =>
1506
+ tp.member(nme.apply).hasAltWith(d => p(TermRef(tp, nme.apply, d)))
1507
case methRef: TermRef if methRef.widenSingleton.isInstanceOf[MethodicType] =>
- p(methRef) || tp.member(nme.apply).hasAltWith(d => p(TermRef(tp, nme.apply, d)))
1508
+ p(methRef)
1509
case mt: MethodicType =>
1510
p(mt.narrow)
1511
case _ =>
0 commit comments