From 8cd5d3359ec723e9290fa1830d808a269a80279c Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 28 Jan 2018 02:48:06 +0100 Subject: [PATCH] Restore caching of CachedMethodType Looks like this was accidentally removed in 81dc91db0ef630dd5cc6527f1aef5a048f8115ed --- compiler/src/dotty/tools/dotc/core/Types.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 256cefb403c4..baeaa9fc4ee6 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -2887,7 +2887,7 @@ object Types { } final def apply(paramNames: List[TermName])(paramInfosExp: MethodType => List[Type], resultTypeExp: MethodType => Type)(implicit ctx: Context): MethodType = - checkValid(new CachedMethodType(paramNames)(paramInfosExp, resultTypeExp, self)) + checkValid(unique(new CachedMethodType(paramNames)(paramInfosExp, resultTypeExp, self))) def checkValid(mt: MethodType)(implicit ctx: Context): mt.type = { if (Config.checkMethodTypes)