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 @@ -2826,9 +2826,10 @@ object Types {
28262826
28272827 def kind : MethodKind = Plain
28282828
2829- private val methodTypes : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map (self.kind -> self)
2829+ private val methodTypeCompanions : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map .empty
28302830 def withKind (methodKind : MethodKind ): MethodTypeCompanion =
2831- methodTypes.getOrElseUpdate(methodKind, new MethodTypeCompanion { def kind = methodKind })
2831+ if (methodKind == Plain ) this
2832+ else methodTypeCompanions.getOrElseUpdate(methodKind, new MethodTypeCompanion { def kind = methodKind })
28322833
28332834 def withKind (isJava : Boolean = false , isImplicit : Boolean = false ): MethodTypeCompanion =
28342835 withKind(makeMethodKind(isJava, isImplicit))
You can’t perform that action at this time.
0 commit comments