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 {
2837
2837
2838
2838
def kind : MethodKind = Plain
2839
2839
2840
- private val methodTypes : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map (self.kind -> self)
2840
+ private val methodTypeCompanions : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map .empty
2841
2841
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 })
2843
2844
2844
2845
def withKind (isJava : Boolean = false , isImplicit : Boolean = false ): MethodTypeCompanion =
2845
2846
withKind(makeMethodKind(isJava, isImplicit))
You can’t perform that action at this time.
0 commit comments