JVM IR: generate private @JvmStatic functions as in old backend
#KT-46181 Fixed
This commit is contained in:
+1
-3
@@ -118,9 +118,7 @@ private class CompanionObjectJvmStaticTransformer(val context: JvmBackendContext
|
||||
private fun IrSimpleFunction.needsStaticProxy(): Boolean = when {
|
||||
// Case 1: `external` static methods are moved to the outer class. JNI code does not care about visibility.
|
||||
isExternal -> true
|
||||
// Case 2: `JvmStatic` is useless on private/inline-only methods because they're not visible to any Java code anyway.
|
||||
visibility == DescriptorVisibilities.PRIVATE -> false
|
||||
visibility == DescriptorVisibilities.PRIVATE_TO_THIS -> false
|
||||
// Case 2: `JvmStatic` is useless on inline-only methods because they're not visible to any Java code anyway.
|
||||
origin == JvmLoweredDeclarationOrigin.SYNTHETIC_METHOD_FOR_PROPERTY_OR_TYPEALIAS_ANNOTATIONS -> false
|
||||
isEffectivelyInlineOnly() -> false
|
||||
// Case 3: protected non-inline needs a static proxy in the parent to be callable from subclasses
|
||||
|
||||
Reference in New Issue
Block a user