@@ -19,7 +19,7 @@ import Periods._
19
19
import Designators ._
20
20
import util .Positions .{Position , NoPosition }
21
21
import util .Stats ._
22
- import util .{ DotClass , SimpleMap }
22
+ import util .DotClass
23
23
import reporting .diagnostic .Message
24
24
import reporting .diagnostic .messages .CyclicReferenceInvolving
25
25
import ast .tpd ._
@@ -2602,7 +2602,32 @@ object Types {
2602
2602
final override def toString = s " $prefixString( $paramNames, $paramInfos, $resType) "
2603
2603
}
2604
2604
2605
- trait HKLambda extends LambdaType
2605
+ abstract class HKLambda extends CachedProxyType with LambdaType {
2606
+ final override def underlying (implicit ctx : Context ) = resType
2607
+
2608
+ final override def computeHash = doHash(paramNames, resType, paramInfos)
2609
+
2610
+ final override def equals (that : Any ) = that match {
2611
+ case that : HKLambda =>
2612
+ paramNames == that.paramNames &&
2613
+ paramInfos == that.paramInfos &&
2614
+ resType == that.resType &&
2615
+ companion.eq(that.companion)
2616
+ case _ =>
2617
+ false
2618
+ }
2619
+
2620
+ final override def eql (that : Type ) = that match {
2621
+ case that : HKLambda =>
2622
+ paramNames.equals(that.paramNames) &&
2623
+ paramInfos.equals(that.paramInfos) &&
2624
+ resType.equals(that.resType) &&
2625
+ companion.eq(that.companion)
2626
+ case _ =>
2627
+ false
2628
+ }
2629
+ }
2630
+
2606
2631
trait MethodOrPoly extends LambdaType with MethodicType
2607
2632
2608
2633
trait TermLambda extends LambdaType { thisLambdaType =>
@@ -2893,7 +2918,7 @@ object Types {
2893
2918
*/
2894
2919
class HKTypeLambda (val paramNames : List [TypeName ])(
2895
2920
paramInfosExp : HKTypeLambda => List [TypeBounds ], resultTypeExp : HKTypeLambda => Type )
2896
- extends UncachedProxyType with HKLambda with TypeLambda {
2921
+ extends HKLambda with TypeLambda {
2897
2922
type This = HKTypeLambda
2898
2923
def companion = HKTypeLambda
2899
2924
@@ -2903,8 +2928,6 @@ object Types {
2903
2928
assert(resType.isInstanceOf [TermType ], this )
2904
2929
assert(paramNames.nonEmpty)
2905
2930
2906
- final override def underlying (implicit ctx : Context ) = resType
2907
-
2908
2931
protected def prefixString = " HKTypeLambda"
2909
2932
}
2910
2933
0 commit comments