@@ -2666,7 +2666,10 @@ object Types {
2666
2666
}
2667
2667
}
2668
2668
2669
- trait MethodOrPoly extends LambdaType with MethodicType
2669
+ abstract class MethodOrPoly extends UncachedGroundType with LambdaType with MethodicType {
2670
+ final override def hashCode = System .identityHashCode(this )
2671
+ final override def equals (other : Any ) = this `eq` other.asInstanceOf [AnyRef ]
2672
+ }
2670
2673
2671
2674
trait TermLambda extends LambdaType { thisLambdaType =>
2672
2675
import DepStatus ._
@@ -2783,7 +2786,7 @@ object Types {
2783
2786
abstract case class MethodType (paramNames : List [TermName ])(
2784
2787
paramInfosExp : MethodType => List [Type ],
2785
2788
resultTypeExp : MethodType => Type )
2786
- extends CachedGroundType with MethodOrPoly with TermLambda with NarrowCached { thisMethodType =>
2789
+ extends MethodOrPoly with TermLambda with NarrowCached { thisMethodType =>
2787
2790
import MethodType ._
2788
2791
2789
2792
type This = MethodType
@@ -2800,28 +2803,6 @@ object Types {
2800
2803
def computeSignature (implicit ctx : Context ): Signature =
2801
2804
resultSignature.prepend(paramInfos, isJavaMethod)
2802
2805
2803
- final override def computeHash = doHash(paramNames, resType, paramInfos)
2804
-
2805
- final override def equals (that : Any ) = that match {
2806
- case that : MethodType =>
2807
- paramNames == that.paramNames &&
2808
- paramInfos == that.paramInfos &&
2809
- resType == that.resType &&
2810
- companion.eq(that.companion)
2811
- case _ =>
2812
- false
2813
- }
2814
-
2815
- final override def eql (that : Type ) = that match {
2816
- case that : MethodType =>
2817
- paramNames.eqElements(that.paramNames) &&
2818
- paramInfos.eqElements(that.paramInfos) &&
2819
- resType.eq(that.resType) &&
2820
- companion.eq(that.companion)
2821
- case _ =>
2822
- false
2823
- }
2824
-
2825
2806
protected def prefixString = " MethodType"
2826
2807
}
2827
2808
@@ -2979,7 +2960,7 @@ object Types {
2979
2960
*/
2980
2961
class PolyType (val paramNames : List [TypeName ])(
2981
2962
paramInfosExp : PolyType => List [TypeBounds ], resultTypeExp : PolyType => Type )
2982
- extends UncachedGroundType with MethodOrPoly with TypeLambda {
2963
+ extends MethodOrPoly with TypeLambda {
2983
2964
2984
2965
type This = PolyType
2985
2966
def companion = PolyType
0 commit comments