Files
Leonid Startsev fba2f5ea4e Expand most kotlinx.serialization tests on JS backend
to enhance and increase test coverage of the plugin.
2024-01-10 12:17:34 +00:00

19 lines
417 B
Kotlin
Vendored

// WITH_STDLIB
import kotlinx.serialization.*
import kotlinx.serialization.json.*
import kotlinx.serialization.descriptors.*
interface E
@Serializable
class Box<T: E>(val boxed: T)
@Serializable
class Wrapper(val boxed: Box<*>)
fun box(): String {
val s = Wrapper.serializer().descriptor.elementDescriptors.joinToString()
return if (s == "Box(boxed: kotlinx.serialization.Polymorphic<E>)") "OK" else s
}