JVM_IR: Don't mangle internal constructor-impl for inline classes
This commit is contained in:
+9
-2
@@ -111,11 +111,18 @@ class MethodSignatureMapper(private val context: JvmBackendContext) {
|
|||||||
return newName
|
return newName
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (function !is IrConstructor && function.visibility == Visibilities.INTERNAL && !function.isPublishedApi()) {
|
return if (function.shouldMangleAsInternal())
|
||||||
KotlinTypeMapper.InternalNameMapper.mangleInternalName(newName, getModuleName(function))
|
KotlinTypeMapper.InternalNameMapper.mangleInternalName(newName, getModuleName(function))
|
||||||
} else newName
|
else
|
||||||
|
newName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun IrFunction.shouldMangleAsInternal() =
|
||||||
|
this !is IrConstructor &&
|
||||||
|
origin != JvmLoweredDeclarationOrigin.STATIC_INLINE_CLASS_CONSTRUCTOR &&
|
||||||
|
visibility == Visibilities.INTERNAL &&
|
||||||
|
!isPublishedApi()
|
||||||
|
|
||||||
private fun getModuleName(function: IrFunction): String =
|
private fun getModuleName(function: IrFunction): String =
|
||||||
(if (function is IrLazyFunctionBase)
|
(if (function is IrLazyFunctionBase)
|
||||||
getJvmModuleNameForDeserialized(function)
|
getJvmModuleNameForDeserialized(function)
|
||||||
|
|||||||
Reference in New Issue
Block a user