@@ -76,9 +76,9 @@ object Implicits:
7676 */
7777 def hasExtMethod (tp : Type , expected : Type )(using Context ) = expected match
7878 case selProto @ SelectionProto (selName : TermName , _, _, _) =>
79- tp.memberBasedOnFlags(selName, required = ExtensionMethod ).exists
80- || tp.memberBasedOnFlags(selProto.extensionName, required = ExtensionMethod ).exists
81- case _ => false
79+ tp.memberBasedOnFlags(selName, required = ExtensionMethod ).exists
80+ case _ =>
81+ false
8282
8383 def strictEquality (using Context ): Boolean =
8484 ctx.mode.is(Mode .StrictEquality ) || Feature .enabled(nme.strictEquality)
@@ -1023,12 +1023,7 @@ trait Implicits:
10231023 pt match
10241024 case selProto @ SelectionProto (selName : TermName , mbrType, _, _) if cand.isExtension =>
10251025 def tryExtension (using Context ) =
1026- val xname =
1027- if ref.memberBasedOnFlags(selProto.extensionName, required = ExtensionMethod ).exists then
1028- selProto.extensionName
1029- else
1030- selName
1031- extMethodApply(untpd.Select (untpdGenerated, xname), argument, mbrType)
1026+ extMethodApply(untpd.Select (untpdGenerated, selName), argument, mbrType)
10321027 if cand.isConversion then
10331028 val extensionCtx, conversionCtx = ctx.fresh.setNewTyperState()
10341029 val extensionResult = tryExtension(using extensionCtx)
0 commit comments