@@ -2663,7 +2663,6 @@ object Types {
2663
2663
final def isHigherKinded = isInstanceOf [TypeProxy ]
2664
2664
2665
2665
private [this ] var myParamRefs : List [ParamRefType ] = null
2666
- private [this ] var myStableHash : Byte = 0
2667
2666
2668
2667
def paramRefs : List [ParamRefType ] = {
2669
2668
if (myParamRefs == null ) myParamRefs = paramNames.indices.toList.map(newParamRef)
@@ -2696,20 +2695,24 @@ object Types {
2696
2695
x => paramInfos.mapConserve(_.subst(this , x).asInstanceOf [PInfo ]),
2697
2696
x => resType.subst(this , x))
2698
2697
2698
+ protected def prefixString : String
2699
+ final override def toString = s " $prefixString( $paramNames, $paramInfos, $resType) "
2700
+ }
2701
+
2702
+ abstract class HKLambda extends CachedProxyType with LambdaType {
2703
+ final override def underlying (implicit ctx : Context ) = resType
2704
+
2699
2705
override def computeHash (bs : Binders ) =
2700
2706
doHash(new Binders (this , bs), paramNames, resType, paramInfos)
2701
2707
2702
- override def stableHash = {
2703
- if (myStableHash == 0 ) myStableHash = if (resType.stableHash && paramInfos.stableHash) 1 else - 1
2704
- myStableHash > 0
2705
- }
2708
+ override def stableHash = resType.stableHash && paramInfos.stableHash
2706
2709
2707
2710
final override def equals (that : Any ) = equals(that, null )
2708
2711
2709
2712
// No definition of `eql` --> fall back on equals, which calls iso
2710
2713
2711
2714
final override def iso (that : Any , bs : BinderPairs ) = that match {
2712
- case that : LambdaType =>
2715
+ case that : HKLambda =>
2713
2716
paramNames.eqElements(that.paramNames) &&
2714
2717
companion.eq(that.companion) && {
2715
2718
val bs1 = new BinderPairs (this , that, bs)
@@ -2719,17 +2722,13 @@ object Types {
2719
2722
case _ =>
2720
2723
false
2721
2724
}
2722
-
2723
- protected def prefixString : String
2724
- final override def toString = s " $prefixString( $paramNames, $paramInfos, $resType) "
2725
2725
}
2726
2726
2727
- abstract class HKLambda extends CachedProxyType with LambdaType {
2728
- final override def underlying (implicit ctx : Context ) = resType
2727
+ abstract class MethodOrPoly extends UncachedGroundType with LambdaType with MethodicType {
2728
+ final override def hashCode = System .identityHashCode(this )
2729
+ final override def equals (other : Any ) = this `eq` other.asInstanceOf [AnyRef ]
2729
2730
}
2730
2731
2731
- abstract class MethodOrPoly extends CachedGroundType with LambdaType with MethodicType
2732
-
2733
2732
trait TermLambda extends LambdaType { thisLambdaType =>
2734
2733
import DepStatus ._
2735
2734
type ThisName = TermName
0 commit comments