@@ -2657,7 +2657,10 @@ object Types {
2657
2657
}
2658
2658
}
2659
2659
2660
- trait MethodOrPoly extends LambdaType with MethodicType
2660
+ abstract class MethodOrPoly extends UncachedGroundType with LambdaType with MethodicType {
2661
+ final override def hashCode = System .identityHashCode(this )
2662
+ final override def equals (other : Any ) = this `eq` other.asInstanceOf [AnyRef ]
2663
+ }
2661
2664
2662
2665
trait TermLambda extends LambdaType { thisLambdaType =>
2663
2666
import DepStatus ._
@@ -2774,7 +2777,7 @@ object Types {
2774
2777
abstract case class MethodType (paramNames : List [TermName ])(
2775
2778
paramInfosExp : MethodType => List [Type ],
2776
2779
resultTypeExp : MethodType => Type )
2777
- extends CachedGroundType with MethodOrPoly with TermLambda with NarrowCached { thisMethodType =>
2780
+ extends MethodOrPoly with TermLambda with NarrowCached { thisMethodType =>
2778
2781
import MethodType ._
2779
2782
2780
2783
type This = MethodType
@@ -2791,28 +2794,6 @@ object Types {
2791
2794
def computeSignature (implicit ctx : Context ): Signature =
2792
2795
resultSignature.prepend(paramInfos, isJavaMethod)
2793
2796
2794
- final override def computeHash = doHash(paramNames, resType, paramInfos)
2795
-
2796
- final override def equals (that : Any ) = that match {
2797
- case that : MethodType =>
2798
- paramNames == that.paramNames &&
2799
- paramInfos == that.paramInfos &&
2800
- resType == that.resType &&
2801
- companion.eq(that.companion)
2802
- case _ =>
2803
- false
2804
- }
2805
-
2806
- final override def eql (that : Type ) = that match {
2807
- case that : MethodType =>
2808
- paramNames.eqElements(that.paramNames) &&
2809
- paramInfos.eqElements(that.paramInfos) &&
2810
- resType.eq(that.resType) &&
2811
- companion.eq(that.companion)
2812
- case _ =>
2813
- false
2814
- }
2815
-
2816
2797
protected def prefixString = " MethodType"
2817
2798
}
2818
2799
@@ -2970,7 +2951,7 @@ object Types {
2970
2951
*/
2971
2952
class PolyType (val paramNames : List [TypeName ])(
2972
2953
paramInfosExp : PolyType => List [TypeBounds ], resultTypeExp : PolyType => Type )
2973
- extends UncachedGroundType with MethodOrPoly with TypeLambda {
2954
+ extends MethodOrPoly with TypeLambda {
2974
2955
2975
2956
type This = PolyType
2976
2957
def companion = PolyType
0 commit comments