JVM_IR: use computeIfAbsent in ClassCodegen.getOrCreate()
This commit is contained in:
committed by
TeamCityServer
parent
a5a79215d7
commit
32518eee4b
+1
-1
@@ -500,7 +500,7 @@ class ClassCodegen private constructor(
|
||||
it.origin == JvmLoweredDeclarationOrigin.CLASS_STATIC_INITIALIZER
|
||||
},
|
||||
): ClassCodegen =
|
||||
context.classCodegens.getOrPut(irClass) { ClassCodegen(irClass, context, parentFunction) }.also {
|
||||
context.classCodegens.computeIfAbsent(irClass) { ClassCodegen(irClass, context, parentFunction) }.also {
|
||||
assert(parentFunction == null || it.parentFunction == parentFunction) {
|
||||
"inconsistent parent function for ${irClass.render()}:\n" +
|
||||
"New: ${parentFunction!!.render()}\n" +
|
||||
|
||||
Reference in New Issue
Block a user