Skip to content

Commit be21cd1

Browse files
committed
No need to cache ExprType#signature now that its constant
1 parent d02cbe1 commit be21cd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,7 +3068,7 @@ object Types {
30683068
}
30693069
}
30703070

3071-
trait MethodicType extends SignatureCachingType {
3071+
trait MethodicType extends TermType {
30723072
protected def resultSignature(implicit ctx: Context): Signature = try resultType match {
30733073
case rtp: MethodicType => rtp.signature
30743074
case tp =>
@@ -3088,7 +3088,7 @@ object Types {
30883088
override def resultType(implicit ctx: Context): Type = resType
30893089
override def underlying(implicit ctx: Context): Type = resType
30903090

3091-
def computeSignature(implicit ctx: Context): Signature = Signature.NotAMethod
3091+
override def signature(implicit ctx: Context): Signature = Signature.NotAMethod
30923092

30933093
def derivedExprType(resType: Type)(implicit ctx: Context): ExprType =
30943094
if (resType eq this.resType) this else ExprType(resType)
@@ -3194,7 +3194,7 @@ object Types {
31943194
final override def equals(that: Any): Boolean = equals(that, null)
31953195
}
31963196

3197-
abstract class MethodOrPoly extends UncachedGroundType with LambdaType with MethodicType {
3197+
abstract class MethodOrPoly extends UncachedGroundType with LambdaType with MethodicType with SignatureCachingType {
31983198
final override def hashCode: Int = System.identityHashCode(this)
31993199

32003200
final override def equals(that: Any): Boolean = equals(that, null)

0 commit comments

Comments
 (0)