File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ class Typer extends Namer
471
471
checkStableIdentPattern(tree2, pt)
472
472
tree2
473
473
474
- def isLocalExtensionMethodRef : Boolean = { rawType match
474
+ def isLocalExtensionMethodRef : Boolean = rawType match
475
475
case rawType : TermRef =>
476
476
rawType.denot.hasAltWith(_.symbol.is(ExtensionMethod ))
477
477
&& ! pt.isExtensionApplyProto
@@ -484,7 +484,6 @@ class Typer extends Namer
484
484
}
485
485
case _ =>
486
486
false
487
- }
488
487
489
488
if ctx.mode.is(Mode .InExtensionMethod ) && isLocalExtensionMethodRef then
490
489
val xmethod = ctx.owner.enclosingExtensionMethod
@@ -2940,12 +2939,7 @@ class Typer extends Namer
2940
2939
def adaptOverloaded (ref : TermRef ) = {
2941
2940
val altDenots =
2942
2941
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
2947
2942
if pt.isExtensionApplyProto then allDenots.filter(_.symbol.is(ExtensionMethod ))
2948
- else if isIdent then allDenots.filterNot(_.symbol.is(ExtensionMethod ))
2949
2943
else allDenots
2950
2944
typr.println(i " adapt overloaded $ref with alternatives ${altDenots map (_.info)}% \n\n % " )
2951
2945
def altRef (alt : SingleDenotation ) = TermRef (ref.prefix, ref.name, alt)
You can’t perform that action at this time.
0 commit comments