@@ -758,18 +758,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
758
758
typedSelectWithAdapt(tree, pt, qual)
759
759
else EmptyTree
760
760
761
- // Otherwise, heal member selection on an opaque reference,
762
- // reusing the logic in TypeComparer.
763
- def tryLiftToThis () =
764
- val wtp = qual.tpe.widen
765
- val liftedTp = comparing(_.liftToThis(wtp))
766
- if liftedTp ne wtp then
767
- val qual1 = qual.cast(liftedTp)
768
- val tree1 = cpy.Select (tree0)(qual1, selName)
769
- val rawType1 = selectionType(tree1, qual1)
770
- tryType(tree1, qual1, rawType1)
771
- else EmptyTree
772
-
773
761
// Otherwise, try to expand a named tuple selection
774
762
def tryNamedTupleSelection () =
775
763
val namedTupleElems = qual.tpe.widenDealias.namedTupleElementTypes
@@ -881,7 +869,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
881
869
tryType(tree, qual, rawType)
882
870
.orElse(trySimplifyApply())
883
871
.orElse(tryInstantiateTypeVar())
884
- .orElse(tryLiftToThis())
885
872
.orElse(tryNamedTupleSelection())
886
873
.orElse(trySmallGenericTuple(qual, withCast = true ))
887
874
.orElse(tryExt(tree, qual))
0 commit comments