Files
kotlin-fork/plugins/kotlinx-serialization/testData/boxIr/expectActualSealedClass.kt
T
2023-06-16 17:55:45 +00:00

26 lines
576 B
Kotlin
Vendored

// LANGUAGE: +MultiPlatformProjects
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
// IGNORE REASON: multimodule MPP tests are not supported for K1
// WITH_STDLIB
// MODULE: m1-common
// FILE: common.kt
import kotlinx.serialization.*
@Serializable
expect sealed class Some
fun s(): KSerializer<Some> = Some.Companion.serializer()
// MODULE: m2-jvm()()(m1-common)
// FILE: jvm.kt
import kotlinx.serialization.*
@Serializable
actual sealed class Some
fun box(): String = if (s().descriptor.toString() == Some.serializer().descriptor.toString()) "OK" else "fail"