jvm-abi-gen: Remove data class copy fun from ABI along with constructor
#KT-64591 Fixed
This commit is contained in:
committed by
Space Team
parent
692cc64d2a
commit
91002eacda
+20
-12
@@ -5,25 +5,17 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.jvm.abi
|
package org.jetbrains.kotlin.jvm.abi
|
||||||
|
|
||||||
import com.intellij.psi.PsiElement
|
|
||||||
import org.jetbrains.kotlin.backend.jvm.extensions.ClassGenerator
|
import org.jetbrains.kotlin.backend.jvm.extensions.ClassGenerator
|
||||||
import org.jetbrains.kotlin.backend.jvm.extensions.ClassGeneratorExtension
|
import org.jetbrains.kotlin.backend.jvm.extensions.ClassGeneratorExtension
|
||||||
import org.jetbrains.kotlin.codegen.ClassBuilder
|
|
||||||
import org.jetbrains.kotlin.codegen.ClassBuilderFactory
|
|
||||||
import org.jetbrains.kotlin.codegen.DelegatingClassBuilder
|
|
||||||
import org.jetbrains.kotlin.codegen.DelegatingClassBuilderFactory
|
|
||||||
import org.jetbrains.kotlin.codegen.inline.coroutines.FOR_INLINE_SUFFIX
|
import org.jetbrains.kotlin.codegen.inline.coroutines.FOR_INLINE_SUFFIX
|
||||||
import org.jetbrains.kotlin.codegen.`when`.WhenByEnumsMapping
|
import org.jetbrains.kotlin.codegen.`when`.WhenByEnumsMapping
|
||||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.MemberDescriptor
|
|
||||||
import org.jetbrains.kotlin.diagnostics.DiagnosticSink
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrClass
|
import org.jetbrains.kotlin.ir.declarations.IrClass
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
import org.jetbrains.kotlin.ir.declarations.IrFunction
|
||||||
|
import org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI
|
||||||
|
import org.jetbrains.kotlin.ir.util.primaryConstructor
|
||||||
|
import org.jetbrains.kotlin.load.java.JvmAbi
|
||||||
import org.jetbrains.kotlin.load.java.JvmAnnotationNames
|
import org.jetbrains.kotlin.load.java.JvmAnnotationNames
|
||||||
import org.jetbrains.kotlin.resolve.BindingContext
|
|
||||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.JvmDeclarationOrigin
|
|
||||||
import org.jetbrains.org.objectweb.asm.AnnotationVisitor
|
import org.jetbrains.org.objectweb.asm.AnnotationVisitor
|
||||||
import org.jetbrains.org.objectweb.asm.MethodVisitor
|
import org.jetbrains.org.objectweb.asm.MethodVisitor
|
||||||
import org.jetbrains.org.objectweb.asm.Opcodes
|
import org.jetbrains.org.objectweb.asm.Opcodes
|
||||||
@@ -64,7 +56,9 @@ sealed class AbiClassInfo {
|
|||||||
* be stripped. However, if `f` is not callable directly, we only generate a
|
* be stripped. However, if `f` is not callable directly, we only generate a
|
||||||
* single inline method `f` which should be kept.
|
* single inline method `f` which should be kept.
|
||||||
*/
|
*/
|
||||||
class JvmAbiClassBuilderInterceptor : ClassGeneratorExtension {
|
class JvmAbiClassBuilderInterceptor(
|
||||||
|
private val removeDataClassCopyIfConstructorIsPrivate: Boolean,
|
||||||
|
) : ClassGeneratorExtension {
|
||||||
val abiClassInfo: MutableMap<String, AbiClassInfo> = mutableMapOf()
|
val abiClassInfo: MutableMap<String, AbiClassInfo> = mutableMapOf()
|
||||||
|
|
||||||
override fun generateClass(generator: ClassGenerator, declaration: IrClass?): ClassGenerator =
|
override fun generateClass(generator: ClassGenerator, declaration: IrClass?): ClassGenerator =
|
||||||
@@ -75,6 +69,12 @@ class JvmAbiClassBuilderInterceptor : ClassGeneratorExtension {
|
|||||||
irClass: IrClass?,
|
irClass: IrClass?,
|
||||||
) : ClassGenerator by delegate {
|
) : ClassGenerator by delegate {
|
||||||
private val isPrivateClass = irClass != null && DescriptorVisibilities.isPrivate(irClass.visibility)
|
private val isPrivateClass = irClass != null && DescriptorVisibilities.isPrivate(irClass.visibility)
|
||||||
|
private val isDataClass = irClass != null && irClass.isData
|
||||||
|
|
||||||
|
@OptIn(UnsafeDuringIrConstructionAPI::class)
|
||||||
|
private val primaryConstructorIsNotInAbi =
|
||||||
|
irClass?.primaryConstructor?.visibility?.let(DescriptorVisibilities::isPrivate) == true
|
||||||
|
|
||||||
lateinit var internalName: String
|
lateinit var internalName: String
|
||||||
var localOrAnonymousClass = false
|
var localOrAnonymousClass = false
|
||||||
var publicAbi = false
|
var publicAbi = false
|
||||||
@@ -126,6 +126,14 @@ class JvmAbiClassBuilderInterceptor : ClassGeneratorExtension {
|
|||||||
return delegate.newMethod(declaration, access, name, desc, signature, exceptions)
|
return delegate.newMethod(declaration, access, name, desc, signature, exceptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isDataClass && removeDataClassCopyIfConstructorIsPrivate &&
|
||||||
|
(name == "copy" || name == "copy${JvmAbi.DEFAULT_PARAMS_IMPL_SUFFIX}")
|
||||||
|
) {
|
||||||
|
if (primaryConstructorIsNotInAbi) {
|
||||||
|
return delegate.newMethod(declaration, access, name, desc, signature, exceptions)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Copy inline functions verbatim
|
// Copy inline functions verbatim
|
||||||
if (declaration?.isInline == true && !isPrivateClass) {
|
if (declaration?.isInline == true && !isPrivateClass) {
|
||||||
methodInfos[Method(name, desc)] = AbiMethodInfo.KEEP
|
methodInfos[Method(name, desc)] = AbiMethodInfo.KEEP
|
||||||
|
|||||||
@@ -32,18 +32,32 @@ class JvmAbiCommandLineProcessor : CommandLineProcessor {
|
|||||||
"sites of inline functions.",
|
"sites of inline functions.",
|
||||||
false,
|
false,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE_OPTION: CliOption =
|
||||||
|
CliOption(
|
||||||
|
"removeDataClassCopyIfConstructorIsPrivate",
|
||||||
|
"true/false",
|
||||||
|
"Remove the 'copy' function from ABI if the primary constructor of the data class is private. False by default. " +
|
||||||
|
"Note that if ABI jars are used for incremental compilation, removal of the 'copy' function might break usages " +
|
||||||
|
"outside of the compilation unit where it's declared.",
|
||||||
|
false,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val pluginId: String
|
override val pluginId: String
|
||||||
get() = COMPILER_PLUGIN_ID
|
get() = COMPILER_PLUGIN_ID
|
||||||
|
|
||||||
override val pluginOptions: Collection<CliOption>
|
override val pluginOptions: Collection<CliOption>
|
||||||
get() = listOf(OUTPUT_PATH_OPTION, REMOVE_DEBUG_INFO_OPTION)
|
get() = listOf(OUTPUT_PATH_OPTION, REMOVE_DEBUG_INFO_OPTION, REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE_OPTION)
|
||||||
|
|
||||||
override fun processOption(option: AbstractCliOption, value: String, configuration: CompilerConfiguration) {
|
override fun processOption(option: AbstractCliOption, value: String, configuration: CompilerConfiguration) {
|
||||||
when (option) {
|
when (option) {
|
||||||
OUTPUT_PATH_OPTION -> configuration.put(JvmAbiConfigurationKeys.OUTPUT_PATH, value)
|
OUTPUT_PATH_OPTION -> configuration.put(JvmAbiConfigurationKeys.OUTPUT_PATH, value)
|
||||||
REMOVE_DEBUG_INFO_OPTION -> configuration.put(JvmAbiConfigurationKeys.REMOVE_DEBUG_INFO, value == "true")
|
REMOVE_DEBUG_INFO_OPTION -> configuration.put(JvmAbiConfigurationKeys.REMOVE_DEBUG_INFO, value == "true")
|
||||||
|
REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE_OPTION -> configuration.put(
|
||||||
|
JvmAbiConfigurationKeys.REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE,
|
||||||
|
value == "true"
|
||||||
|
)
|
||||||
else -> throw CliOptionProcessingException("Unknown option: ${option.optionName}")
|
else -> throw CliOptionProcessingException("Unknown option: ${option.optionName}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,11 +19,15 @@ class JvmAbiComponentRegistrar : CompilerPluginRegistrar() {
|
|||||||
val outputPath = configuration.getNotNull(JvmAbiConfigurationKeys.OUTPUT_PATH)
|
val outputPath = configuration.getNotNull(JvmAbiConfigurationKeys.OUTPUT_PATH)
|
||||||
val messageCollector = configuration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE)
|
val messageCollector = configuration.get(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, MessageCollector.NONE)
|
||||||
configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true)
|
configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true)
|
||||||
val builderExtension = JvmAbiClassBuilderInterceptor()
|
val removeDataClassCopy = configuration.getBoolean(JvmAbiConfigurationKeys.REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE)
|
||||||
|
|
||||||
|
val builderExtension = JvmAbiClassBuilderInterceptor(removeDataClassCopy)
|
||||||
val outputExtension = JvmAbiOutputExtension(
|
val outputExtension = JvmAbiOutputExtension(
|
||||||
File(outputPath), builderExtension.abiClassInfo, messageCollector,
|
File(outputPath), builderExtension.abiClassInfo, messageCollector,
|
||||||
configuration.getBoolean(JvmAbiConfigurationKeys.REMOVE_DEBUG_INFO),
|
configuration.getBoolean(JvmAbiConfigurationKeys.REMOVE_DEBUG_INFO),
|
||||||
|
removeDataClassCopy,
|
||||||
)
|
)
|
||||||
|
|
||||||
ClassGeneratorExtension.registerExtension(builderExtension)
|
ClassGeneratorExtension.registerExtension(builderExtension)
|
||||||
ClassFileFactoryFinalizerExtension.registerExtension(outputExtension)
|
ClassFileFactoryFinalizerExtension.registerExtension(outputExtension)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,4 +12,6 @@ object JvmAbiConfigurationKeys {
|
|||||||
CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.OUTPUT_PATH_OPTION.description)
|
CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.OUTPUT_PATH_OPTION.description)
|
||||||
val REMOVE_DEBUG_INFO: CompilerConfigurationKey<Boolean> =
|
val REMOVE_DEBUG_INFO: CompilerConfigurationKey<Boolean> =
|
||||||
CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.REMOVE_DEBUG_INFO_OPTION.description)
|
CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.REMOVE_DEBUG_INFO_OPTION.description)
|
||||||
|
val REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE: CompilerConfigurationKey<Boolean> =
|
||||||
|
CompilerConfigurationKey.create(JvmAbiCommandLineProcessor.REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE_OPTION.description)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ import org.jetbrains.org.objectweb.asm.Opcodes
|
|||||||
* Wrap the visitor for a Kotlin Metadata annotation to strip out private and local
|
* Wrap the visitor for a Kotlin Metadata annotation to strip out private and local
|
||||||
* functions, properties, and type aliases as well as local delegated properties.
|
* functions, properties, and type aliases as well as local delegated properties.
|
||||||
*/
|
*/
|
||||||
fun abiMetadataProcessor(annotationVisitor: AnnotationVisitor): AnnotationVisitor =
|
fun abiMetadataProcessor(
|
||||||
|
annotationVisitor: AnnotationVisitor,
|
||||||
|
removeDataClassCopyIfConstructorIsPrivate: Boolean,
|
||||||
|
): AnnotationVisitor =
|
||||||
kotlinClassHeaderVisitor { header ->
|
kotlinClassHeaderVisitor { header ->
|
||||||
// kotlinx-metadata only supports writing Kotlin metadata of version >= 1.4, so we need to
|
// kotlinx-metadata only supports writing Kotlin metadata of version >= 1.4, so we need to
|
||||||
// update the metadata version if we encounter older metadata annotations.
|
// update the metadata version if we encounter older metadata annotations.
|
||||||
@@ -29,7 +32,7 @@ fun abiMetadataProcessor(annotationVisitor: AnnotationVisitor): AnnotationVisito
|
|||||||
KotlinClassMetadata.transform(header) { metadata ->
|
KotlinClassMetadata.transform(header) { metadata ->
|
||||||
when (metadata) {
|
when (metadata) {
|
||||||
is KotlinClassMetadata.Class -> {
|
is KotlinClassMetadata.Class -> {
|
||||||
metadata.kmClass.removePrivateDeclarations()
|
metadata.kmClass.removePrivateDeclarations(removeDataClassCopyIfConstructorIsPrivate)
|
||||||
}
|
}
|
||||||
is KotlinClassMetadata.FileFacade -> {
|
is KotlinClassMetadata.FileFacade -> {
|
||||||
metadata.kmPackage.removePrivateDeclarations()
|
metadata.kmPackage.removePrivateDeclarations()
|
||||||
@@ -146,21 +149,23 @@ private fun AnnotationVisitor.visitKotlinMetadata(header: Metadata) {
|
|||||||
visitEnd()
|
visitEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun KmClass.removePrivateDeclarations() {
|
private fun KmClass.removePrivateDeclarations(removeCopyAlongWithConstructor: Boolean) {
|
||||||
constructors.removeIf { it.visibility.isPrivate }
|
constructors.removeIf { it.visibility.isPrivate }
|
||||||
(this as KmDeclarationContainer).removePrivateDeclarations()
|
(this as KmDeclarationContainer).removePrivateDeclarations(
|
||||||
|
copyFunShouldBeDeleted(removeCopyAlongWithConstructor)
|
||||||
|
)
|
||||||
localDelegatedProperties.clear()
|
localDelegatedProperties.clear()
|
||||||
// TODO: do not serialize private type aliases once KT-17229 is fixed.
|
// TODO: do not serialize private type aliases once KT-17229 is fixed.
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun KmPackage.removePrivateDeclarations() {
|
private fun KmPackage.removePrivateDeclarations() {
|
||||||
(this as KmDeclarationContainer).removePrivateDeclarations()
|
(this as KmDeclarationContainer).removePrivateDeclarations(false)
|
||||||
localDelegatedProperties.clear()
|
localDelegatedProperties.clear()
|
||||||
// TODO: do not serialize private type aliases once KT-17229 is fixed.
|
// TODO: do not serialize private type aliases once KT-17229 is fixed.
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun KmDeclarationContainer.removePrivateDeclarations() {
|
private fun KmDeclarationContainer.removePrivateDeclarations(copyFunShouldBeDeleted: Boolean) {
|
||||||
functions.removeIf { it.visibility.isPrivate }
|
functions.removeIf { it.visibility.isPrivate || (copyFunShouldBeDeleted && it.name == "copy") }
|
||||||
properties.removeIf { it.visibility.isPrivate }
|
properties.removeIf { it.visibility.isPrivate }
|
||||||
|
|
||||||
functions.sortWith(compareBy(KmFunction::name, { it.signature.toString() }))
|
functions.sortWith(compareBy(KmFunction::name, { it.signature.toString() }))
|
||||||
@@ -174,5 +179,8 @@ private fun KmDeclarationContainer.removePrivateDeclarations() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun KmClass.copyFunShouldBeDeleted(removeDataClassCopy: Boolean): Boolean =
|
||||||
|
removeDataClassCopy && isData && constructors.none { !it.isSecondary }
|
||||||
|
|
||||||
private val Visibility.isPrivate: Boolean
|
private val Visibility.isPrivate: Boolean
|
||||||
get() = this == Visibility.PRIVATE || this == Visibility.PRIVATE_TO_THIS || this == Visibility.LOCAL
|
get() = this == Visibility.PRIVATE || this == Visibility.PRIVATE_TO_THIS || this == Visibility.LOCAL
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ class JvmAbiOutputExtension(
|
|||||||
private val abiClassInfos: Map<String, AbiClassInfo>,
|
private val abiClassInfos: Map<String, AbiClassInfo>,
|
||||||
private val messageCollector: MessageCollector,
|
private val messageCollector: MessageCollector,
|
||||||
private val removeDebugInfo: Boolean,
|
private val removeDebugInfo: Boolean,
|
||||||
|
private val removeDataClassCopyIfConstructorIsPrivate: Boolean,
|
||||||
) : ClassFileFactoryFinalizerExtension {
|
) : ClassFileFactoryFinalizerExtension {
|
||||||
override fun finalizeClassFactory(factory: ClassFileFactory) {
|
override fun finalizeClassFactory(factory: ClassFileFactory) {
|
||||||
// We need to wait until the end to produce any output in order to strip classes
|
// We need to wait until the end to produce any output in order to strip classes
|
||||||
// from the InnerClasses attributes.
|
// from the InnerClasses attributes.
|
||||||
val outputFiles = AbiOutputFiles(abiClassInfos, factory, removeDebugInfo)
|
val outputFiles = AbiOutputFiles(abiClassInfos, factory, removeDebugInfo, removeDataClassCopyIfConstructorIsPrivate)
|
||||||
if (outputPath.extension == "jar") {
|
if (outputPath.extension == "jar") {
|
||||||
// We don't include the runtime or main class in interface jars and always reset time stamps.
|
// We don't include the runtime or main class in interface jars and always reset time stamps.
|
||||||
CompileEnvironmentUtil.writeToJar(
|
CompileEnvironmentUtil.writeToJar(
|
||||||
@@ -54,6 +55,7 @@ class JvmAbiOutputExtension(
|
|||||||
val abiClassInfos: Map<String, AbiClassInfo>,
|
val abiClassInfos: Map<String, AbiClassInfo>,
|
||||||
val outputFiles: OutputFileCollection,
|
val outputFiles: OutputFileCollection,
|
||||||
val removeDebugInfo: Boolean,
|
val removeDebugInfo: Boolean,
|
||||||
|
val removeCopyAlongWithConstructor: Boolean,
|
||||||
) : OutputFileCollection {
|
) : OutputFileCollection {
|
||||||
override fun get(relativePath: String): OutputFile? {
|
override fun get(relativePath: String): OutputFile? {
|
||||||
error("AbiOutputFiles does not implement `get`.")
|
error("AbiOutputFiles does not implement `get`.")
|
||||||
@@ -153,7 +155,7 @@ class JvmAbiOutputExtension(
|
|||||||
if (descriptor != JvmAnnotationNames.METADATA_DESC)
|
if (descriptor != JvmAnnotationNames.METADATA_DESC)
|
||||||
return delegate
|
return delegate
|
||||||
// Strip private declarations from the Kotlin Metadata annotation.
|
// Strip private declarations from the Kotlin Metadata annotation.
|
||||||
return abiMetadataProcessor(delegate)
|
return abiMetadataProcessor(delegate, removeCopyAlongWithConstructor)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitEnd() {
|
override fun visitEnd() {
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ abstract class BaseJvmAbiTest : TestCase() {
|
|||||||
abiOption(JvmAbiCommandLineProcessor.OUTPUT_PATH_OPTION.optionName, compilation.abiDir.canonicalPath),
|
abiOption(JvmAbiCommandLineProcessor.OUTPUT_PATH_OPTION.optionName, compilation.abiDir.canonicalPath),
|
||||||
abiOption(JvmAbiCommandLineProcessor.REMOVE_DEBUG_INFO_OPTION.optionName, true.toString()).takeIf {
|
abiOption(JvmAbiCommandLineProcessor.REMOVE_DEBUG_INFO_OPTION.optionName, true.toString()).takeIf {
|
||||||
InTextDirectivesUtils.findStringWithPrefixes(directives, "// REMOVE_DEBUG_INFO") != null
|
InTextDirectivesUtils.findStringWithPrefixes(directives, "// REMOVE_DEBUG_INFO") != null
|
||||||
|
},
|
||||||
|
abiOption(
|
||||||
|
JvmAbiCommandLineProcessor.REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE_OPTION.optionName, true.toString()
|
||||||
|
).takeIf {
|
||||||
|
InTextDirectivesUtils.findStringWithPrefixes(directives, "// REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE") != null
|
||||||
}
|
}
|
||||||
).toTypedArray()
|
).toTypedArray()
|
||||||
destination = compilation.destinationDir.canonicalPath
|
destination = compilation.destinationDir.canonicalPath
|
||||||
|
|||||||
+10
@@ -55,6 +55,16 @@ public class CompareJvmAbiTestGenerated extends AbstractCompareJvmAbiTest {
|
|||||||
runTest("plugins/jvm-abi-gen/testData/compare/constant/");
|
runTest("plugins/jvm-abi-gen/testData/compare/constant/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("dataClassWithPrivateConstructor")
|
||||||
|
public void testDataClassWithPrivateConstructor() throws Exception {
|
||||||
|
runTest("plugins/jvm-abi-gen/testData/compare/dataClassWithPrivateConstructor/");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("dataClassWithPrivateConstructorWithoutOption")
|
||||||
|
public void testDataClassWithPrivateConstructorWithoutOption() throws Exception {
|
||||||
|
runTest("plugins/jvm-abi-gen/testData/compare/dataClassWithPrivateConstructorWithoutOption/");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("debugInfoLineNumberTable")
|
@TestMetadata("debugInfoLineNumberTable")
|
||||||
public void testDebugInfoLineNumberTable() throws Exception {
|
public void testDebugInfoLineNumberTable() throws Exception {
|
||||||
runTest("plugins/jvm-abi-gen/testData/compare/debugInfoLineNumberTable/");
|
runTest("plugins/jvm-abi-gen/testData/compare/debugInfoLineNumberTable/");
|
||||||
|
|||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
data class Class private constructor(
|
||||||
|
val publicProperty: Any,
|
||||||
|
private val privateProperty: Any,
|
||||||
|
)
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
// REMOVE_DATA_CLASS_COPY_IF_CONSTRUCTOR_IS_PRIVATE
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
data class Class private constructor(
|
||||||
|
val publicProperty: Any,
|
||||||
|
)
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
data class Class private constructor(
|
||||||
|
val publicProperty: Any,
|
||||||
|
private val privateProperty: Any,
|
||||||
|
)
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
data class Class private constructor(
|
||||||
|
val publicProperty: Any,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user