KT-4107 Data objects

This commit is contained in:
Pavel Mikhailovskii
2022-06-28 09:51:57 +02:00
parent 6c31dc90e4
commit c3c09aa95a
75 changed files with 1183 additions and 134 deletions
@@ -0,0 +1,16 @@
// !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
}
@@ -0,0 +1,26 @@
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
}