KT-4107 Don't generate readResolve for data objects

This commit is contained in:
Pavel Mikhailovskii
2022-11-30 09:26:14 +01:00
committed by Space Team
parent ea346e3e0e
commit f96d41e414
9 changed files with 6 additions and 151 deletions
@@ -1,17 +0,0 @@
// FIR_IDENTICAL
// !LANGUAGE: +DataObjects
// TARGET_BACKEND: JVM_IR
import java.io.Serializable
data <!CONFLICTING_JVM_DECLARATIONS!>object A<!> : Serializable {
<!CONFLICTING_JVM_DECLARATIONS!>private fun readResolve(): Any<!> = this
}
data object B : Serializable {
private fun readResolve(): B = this
}
data object C {
private fun readResolve(): Any = this
}
@@ -1,26 +0,0 @@
package
public data object A : java.io.Serializable {
private constructor A()
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
private final fun readResolve(): kotlin.Any
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
}
public data object B : java.io.Serializable {
private constructor B()
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
private final fun readResolve(): B
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
}
public data object C {
private constructor C()
public open override /*1*/ /*synthesized*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*synthesized*/ fun hashCode(): kotlin.Int
private final fun readResolve(): kotlin.Any
public open override /*1*/ /*synthesized*/ fun toString(): kotlin.String
}