@@ -715,18 +715,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
715715 typedSelectWithAdapt(tree, pt, qual)
716716 else EmptyTree
717717
718- // Otherwise, heal member selection on an opaque reference,
719- // reusing the logic in TypeComparer.
720- def tryLiftToThis () =
721- val wtp = qual.tpe.widen
722- val liftedTp = comparing(_.liftToThis(wtp))
723- if liftedTp ne wtp then
724- val qual1 = qual.cast(liftedTp)
725- val tree1 = cpy.Select (tree0)(qual1, selName)
726- val rawType1 = selectionType(tree1, qual1)
727- tryType(tree1, qual1, rawType1)
728- else EmptyTree
729-
730718 // Otherwise, map combinations of A *: B *: .... EmptyTuple with nesting levels <= 22
731719 // to the Tuple class of the right arity and select from that one
732720 def trySmallGenericTuple (qual : Tree , withCast : Boolean ) =
@@ -793,7 +781,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
793781 tryType(tree, qual, rawType)
794782 .orElse(trySimplifyApply())
795783 .orElse(tryInstantiateTypeVar())
796- .orElse(tryLiftToThis())
797784 .orElse(trySmallGenericTuple(qual, withCast = true ))
798785 .orElse(tryExt(tree, qual))
799786 .orElse(tryGadt())
0 commit comments