Skip to content

Commit ea57ab8

Browse files
committed
Revert special treatment of idents in overloading resolution
1 parent bab6ea5 commit ea57ab8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class Typer extends Namer
471471
checkStableIdentPattern(tree2, pt)
472472
tree2
473473

474-
def isLocalExtensionMethodRef: Boolean = { rawType match
474+
def isLocalExtensionMethodRef: Boolean = rawType match
475475
case rawType: TermRef =>
476476
rawType.denot.hasAltWith(_.symbol.is(ExtensionMethod))
477477
&& !pt.isExtensionApplyProto
@@ -484,7 +484,6 @@ class Typer extends Namer
484484
}
485485
case _ =>
486486
false
487-
}
488487

489488
if ctx.mode.is(Mode.InExtensionMethod) && isLocalExtensionMethodRef then
490489
val xmethod = ctx.owner.enclosingExtensionMethod
@@ -2940,12 +2939,7 @@ class Typer extends Namer
29402939
def adaptOverloaded(ref: TermRef) = {
29412940
val altDenots =
29422941
val allDenots = ref.denot.alternatives
2943-
def isIdent = tree match
2944-
case _: Ident => true
2945-
case Select(qual, name) => qual.span.isZeroExtent
2946-
case _ => false
29472942
if pt.isExtensionApplyProto then allDenots.filter(_.symbol.is(ExtensionMethod))
2948-
else if isIdent then allDenots.filterNot(_.symbol.is(ExtensionMethod))
29492943
else allDenots
29502944
typr.println(i"adapt overloaded $ref with alternatives ${altDenots map (_.info)}%\n\n %")
29512945
def altRef(alt: SingleDenotation) = TermRef(ref.prefix, ref.name, alt)

0 commit comments

Comments
 (0)