[FIR][Serialization] Set containingClassForStaticMemberAttr in generateConstructors

This commit is contained in:
Ivan Kochurkin
2022-11-30 18:27:55 +01:00
committed by Space Team
parent 8936220876
commit 31e2f0ba95
4 changed files with 43 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
// IGNORE_BACKEND_K1: JVM_IR
// TARGET_BACKEND: JVM_IR
// !LANGUAGE: +MultiPlatformProjects
// WITH_STDLIB
// MODULE: common
// TARGET_PLATFORM: Common
// FILE: common.kt
import kotlinx.serialization.*
@Serializable
class Bar<T>(val t: T)
@Serializable
class Wrapper(val b: Bar<String>)
// MODULE: jvm()()(common)
// TARGET_PLATFORM: JVM
// FILE: main.kt
import kotlinx.serialization.*
import kotlinx.serialization.json.*
import kotlinx.serialization.descriptors.*
fun box(): String {
return if (Wrapper.serializer().descriptor.elementDescriptors.first().toString() == "Bar(t: kotlin.String)") "OK" else "FAIL"
}