@@ -2599,57 +2599,8 @@ object Types {
2599
2599
final override def toString = s " $prefixString( $paramNames, $paramInfos, $resType) "
2600
2600
}
2601
2601
2602
- abstract class HKLambda extends CachedProxyType with LambdaType {
2603
- final override def underlying (implicit ctx : Context ) = resType
2604
-
2605
- final override def computeHash = doHash(paramNames, resType, paramInfos)
2606
-
2607
- // Defined here instead of in LambdaType for efficiency
2608
- final override def equals (that : Any ) = that match {
2609
- case that : HKLambda =>
2610
- paramNames == that.paramNames &&
2611
- paramInfos == that.paramInfos &&
2612
- resType == that.resType &&
2613
- companion.eq(that.companion)
2614
- case _ =>
2615
- false
2616
- }
2617
-
2618
- final override def eql (that : Type ) = that match {
2619
- case that : HKLambda =>
2620
- paramNames.equals(that.paramNames) &&
2621
- paramInfos.equals(that.paramInfos) &&
2622
- resType.equals(that.resType) &&
2623
- companion.eq(that.companion)
2624
- case _ =>
2625
- false
2626
- }
2627
- }
2628
-
2629
- abstract class MethodOrPoly extends CachedGroundType with LambdaType with MethodicType {
2630
- final override def computeHash = doHash(paramNames, resType, paramInfos)
2631
-
2632
- // Defined here instead of in LambdaType for efficiency
2633
- final override def equals (that : Any ) = that match {
2634
- case that : MethodOrPoly =>
2635
- paramNames == that.paramNames &&
2636
- paramInfos == that.paramInfos &&
2637
- resType == that.resType &&
2638
- companion.eq(that.companion)
2639
- case _ =>
2640
- false
2641
- }
2642
-
2643
- final override def eql (that : Type ) = that match {
2644
- case that : MethodOrPoly =>
2645
- paramNames.eqElements(that.paramNames) &&
2646
- paramInfos.eqElements(that.paramInfos) &&
2647
- resType.eq(that.resType) &&
2648
- companion.eq(that.companion)
2649
- case _ =>
2650
- false
2651
- }
2652
- }
2602
+ trait HKLambda extends LambdaType
2603
+ trait MethodOrPoly extends LambdaType with MethodicType
2653
2604
2654
2605
trait TermLambda extends LambdaType { thisLambdaType =>
2655
2606
import DepStatus ._
@@ -2752,7 +2703,7 @@ object Types {
2752
2703
abstract case class MethodType (paramNames : List [TermName ])(
2753
2704
paramInfosExp : MethodType => List [Type ],
2754
2705
resultTypeExp : MethodType => Type )
2755
- extends MethodOrPoly with TermLambda with NarrowCached { thisMethodType =>
2706
+ extends CachedGroundType with MethodOrPoly with TermLambda with NarrowCached { thisMethodType =>
2756
2707
import MethodType ._
2757
2708
2758
2709
type This = MethodType
@@ -2764,6 +2715,28 @@ object Types {
2764
2715
def computeSignature (implicit ctx : Context ): Signature =
2765
2716
resultSignature.prepend(paramInfos, isJava)
2766
2717
2718
+ final override def computeHash = doHash(paramNames, resType, paramInfos)
2719
+
2720
+ final override def equals (that : Any ) = that match {
2721
+ case that : MethodType =>
2722
+ paramNames == that.paramNames &&
2723
+ paramInfos == that.paramInfos &&
2724
+ resType == that.resType &&
2725
+ companion.eq(that.companion)
2726
+ case _ =>
2727
+ false
2728
+ }
2729
+
2730
+ final override def eql (that : Type ) = that match {
2731
+ case that : MethodType =>
2732
+ paramNames.eqElements(that.paramNames) &&
2733
+ paramInfos.eqElements(that.paramInfos) &&
2734
+ resType.eq(that.resType) &&
2735
+ companion.eq(that.companion)
2736
+ case _ =>
2737
+ false
2738
+ }
2739
+
2767
2740
protected def prefixString = " MethodType"
2768
2741
}
2769
2742
@@ -2936,7 +2909,7 @@ object Types {
2936
2909
*/
2937
2910
class HKTypeLambda (val paramNames : List [TypeName ])(
2938
2911
paramInfosExp : HKTypeLambda => List [TypeBounds ], resultTypeExp : HKTypeLambda => Type )
2939
- extends HKLambda with TypeLambda {
2912
+ extends UncachedProxyType with HKLambda with TypeLambda {
2940
2913
type This = HKTypeLambda
2941
2914
def companion = HKTypeLambda
2942
2915
@@ -2946,6 +2919,8 @@ object Types {
2946
2919
assert(resType.isInstanceOf [TermType ], this )
2947
2920
assert(paramNames.nonEmpty)
2948
2921
2922
+ final override def underlying (implicit ctx : Context ) = resType
2923
+
2949
2924
protected def prefixString = " HKTypeLambda"
2950
2925
}
2951
2926
@@ -2954,7 +2929,7 @@ object Types {
2954
2929
*/
2955
2930
class PolyType (val paramNames : List [TypeName ])(
2956
2931
paramInfosExp : PolyType => List [TypeBounds ], resultTypeExp : PolyType => Type )
2957
- extends MethodOrPoly with TypeLambda {
2932
+ extends UncachedGroundType with MethodOrPoly with TypeLambda {
2958
2933
2959
2934
type This = PolyType
2960
2935
def companion = PolyType
0 commit comments