Skip to content

Commit 7862aaf

Browse files
authored
Merge pull request #3934 from dotty-staging/fix/methodtype-caching
Restore caching of CachedMethodType
2 parents 3649fa8 + 8cd5d33 commit 7862aaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2887,7 +2887,7 @@ object Types {
28872887
}
28882888

28892889
final def apply(paramNames: List[TermName])(paramInfosExp: MethodType => List[Type], resultTypeExp: MethodType => Type)(implicit ctx: Context): MethodType =
2890-
checkValid(new CachedMethodType(paramNames)(paramInfosExp, resultTypeExp, self))
2890+
checkValid(unique(new CachedMethodType(paramNames)(paramInfosExp, resultTypeExp, self)))
28912891

28922892
def checkValid(mt: MethodType)(implicit ctx: Context): mt.type = {
28932893
if (Config.checkMethodTypes)

0 commit comments

Comments
 (0)