Files
kotlin-fork/plugins/kotlinx-serialization/testData/codegen/Sealed.kt
T
2022-08-22 17:23:18 +03:00

19 lines
485 B
Kotlin
Vendored

// CURIOUS_ABOUT deserialize, write$Self, childSerializers, <init>, <clinit>, invoke, serializer
// WITH_STDLIB
import kotlinx.serialization.*
@Serializable
sealed interface X {
fun def() {}
}
// do not forget to update this test with custom serialinfo annotation when serialization 1.3.0 is released
@Serializable
sealed class Result: X {
@Serializable class OK(val s: String): Result()
@Serializable object Err: Result()
}
@Serializable
class Container(val r: Result)