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 {
2826
2826
2827
2827
def kind : MethodKind = Plain
2828
2828
2829
- private val methodTypes : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map (self.kind -> self)
2829
+ private val methodTypeCompanions : mutable.Map [MethodKind , MethodTypeCompanion ] = mutable.Map .empty
2830
2830
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 })
2832
2833
2833
2834
def withKind (isJava : Boolean = false , isImplicit : Boolean = false ): MethodTypeCompanion =
2834
2835
withKind(makeMethodKind(isJava, isImplicit))
You can’t perform that action at this time.
0 commit comments