jvm-abi-gen: Remove internal declarations from ABI

#KT-65690 Fixed
This commit is contained in:
Vladimir Tagakov
2024-02-08 11:54:13 -07:00
committed by Space Team
parent ebc2a18da5
commit d2792533b8
21 changed files with 263 additions and 37 deletions
@@ -0,0 +1,33 @@
package test
internal fun funToBeRemoved() = Unit
internal fun internalTopLevelInlineFun() = Unit
internal class TopLevelClassToBeRemoved
fun emptyKtClassWorkaround() = Unit
class PublicOuterClass {
@JvmField
internal val fieldToBeRemoved = Unit
internal interface InternalInterfaceToBeRemoved
internal class InnerClass: InternalInterfaceToBeRemoved {
fun everyDeclarationShouldBeRemoved() = Unit
inline fun shouldBeRemoved() = Unit
class EffectivelyInternalClassRemoved
}
internal interface TransitivelyPublicInterface
data class Data internal constructor(
val couldNotBeRemoved: String,
internal val shouldBeRemoved: Any,
): TransitivelyPublicInterface
internal inline fun shouldBeRemoved() = Unit
}
@@ -0,0 +1,3 @@
// TREAT_INTERNAL_AS_PRIVATE
// REMOVE_PRIVATE_CLASSES
// REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE
@@ -0,0 +1,11 @@
package test
fun emptyKtClassWorkaround() = Unit
class PublicOuterClass {
internal interface TransitivelyPublicInterface
data class Data internal constructor(
val couldNotBeRemoved: String
): TransitivelyPublicInterface
}