@@ -758,18 +758,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
758758 typedSelectWithAdapt(tree, pt, qual)
759759 else EmptyTree
760760
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-
773761 // Otherwise, try to expand a named tuple selection
774762 def tryNamedTupleSelection () =
775763 val namedTupleElems = qual.tpe.widenDealias.namedTupleElementTypes
@@ -881,7 +869,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
881869 tryType(tree, qual, rawType)
882870 .orElse(trySimplifyApply())
883871 .orElse(tryInstantiateTypeVar())
884- .orElse(tryLiftToThis())
885872 .orElse(tryNamedTupleSelection())
886873 .orElse(trySmallGenericTuple(qual, withCast = true ))
887874 .orElse(tryExt(tree, qual))
0 commit comments