@@ -715,18 +715,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
715
715
typedSelectWithAdapt(tree, pt, qual)
716
716
else EmptyTree
717
717
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
-
730
718
// Otherwise, map combinations of A *: B *: .... EmptyTuple with nesting levels <= 22
731
719
// to the Tuple class of the right arity and select from that one
732
720
def trySmallGenericTuple (qual : Tree , withCast : Boolean ) =
@@ -793,7 +781,6 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
793
781
tryType(tree, qual, rawType)
794
782
.orElse(trySimplifyApply())
795
783
.orElse(tryInstantiateTypeVar())
796
- .orElse(tryLiftToThis())
797
784
.orElse(trySmallGenericTuple(qual, withCast = true ))
798
785
.orElse(tryExt(tree, qual))
799
786
.orElse(tryGadt())
0 commit comments