File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2837,9 +2837,10 @@ object Types {
28372837
28382838 def kind : MethodKind = Plain
28392839
2840- private val methodTypes : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map (self.kind -> self)
2840+ private val methodTypeCompanions : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map .empty
28412841 def withKind (methodKind : MethodKind ): MethodTypeCompanion =
2842- methodTypes.getOrElseUpdate(methodKind, new MethodTypeCompanion { def kind = methodKind })
2842+ if (methodKind == Plain ) this
2843+ else methodTypeCompanions.getOrElseUpdate(methodKind, new MethodTypeCompanion { def kind = methodKind })
28432844
28442845 def withKind (isJava : Boolean = false , isImplicit : Boolean = false ): MethodTypeCompanion =
28452846 withKind(makeMethodKind(isJava, isImplicit))
You can’t perform that action at this time.
0 commit comments