@@ -508,10 +508,20 @@ object Types {
508
508
case tp1 => tp1
509
509
})
510
510
case tp : TypeRef =>
511
- tp.denot.findMember(name, pre, excluded)
511
+ tp.denot match {
512
+ case d : ClassDenotation => d.findMember(name, pre, excluded)
513
+ case d => go(d.info)
514
+ }
512
515
case tp : AppliedType =>
513
- goApplied(tp)
514
- case tp : ThisType =>
516
+ tp.tycon match {
517
+ case tc : TypeRef if tc.symbol.isClass =>
518
+ go(tc)
519
+ case tc : HKTypeLambda =>
520
+ goApplied(tp, tc)
521
+ case _ =>
522
+ go(tp.superType)
523
+ }
524
+ case tp : ThisType => // ??? inline
515
525
goThis(tp)
516
526
case tp : RefinedType =>
517
527
if (name eq tp.refinedName) goRefined(tp) else go(tp.parent)
@@ -598,15 +608,9 @@ object Types {
598
608
}
599
609
}
600
610
601
- def goApplied (tp : AppliedType ) = tp.tycon match {
602
- case tl : HKTypeLambda =>
603
- go(tl.resType).mapInfo(info =>
604
- tl.derivedLambdaAbstraction(tl.paramNames, tl.paramInfos, info).appliedTo(tp.args))
605
- case tc : TypeRef if tc.symbol.isClass =>
606
- go(tc)
607
- case _ =>
608
- go(tp.superType)
609
- }
611
+ def goApplied (tp : AppliedType , tycon : HKTypeLambda ) =
612
+ go(tycon.resType).mapInfo(info =>
613
+ tycon.derivedLambdaAbstraction(tycon.paramNames, tycon.paramInfos, info).appliedTo(tp.args))
610
614
611
615
def goThis (tp : ThisType ) = {
612
616
val d = go(tp.underlying)
@@ -623,6 +627,7 @@ object Types {
623
627
// loadClassWithPrivateInnerAndSubSelf in ShowClassTests
624
628
go(tp.cls.typeRef) orElse d
625
629
}
630
+
626
631
def goParam (tp : TypeParamRef ) = {
627
632
val next = tp.underlying
628
633
ctx.typerState.constraint.entry(tp) match {
@@ -632,12 +637,14 @@ object Types {
632
637
go(next)
633
638
}
634
639
}
640
+
635
641
def goSuper (tp : SuperType ) = go(tp.underlying) match {
636
642
case d : JointRefDenotation =>
637
643
typr.println(i " redirecting super. $name from $tp to ${d.symbol.showLocated}" )
638
644
new UniqueRefDenotation (d.symbol, tp.memberInfo(d.symbol), d.validFor)
639
645
case d => d
640
646
}
647
+
641
648
def goAnd (l : Type , r : Type ) = {
642
649
go(l) & (go(r), pre, safeIntersection = ctx.pendingMemberSearches.contains(name))
643
650
}
0 commit comments