[FIR] Don't create generated nested classifier scope for non-source classes
^KT-57626 Fixed
This commit is contained in:
committed by
Space Team
parent
ea6651445c
commit
fb97f4db87
+25
@@ -0,0 +1,25 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-57626
|
||||
|
||||
// MODULE: lib
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
data class A(val s: String = "")
|
||||
|
||||
// MODULE: main(lib)
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.json.*
|
||||
|
||||
@Serializable
|
||||
data class B(val a: A? = null)
|
||||
|
||||
fun box(): String {
|
||||
val expectedB = B(A("OK"))
|
||||
val json = Json.encodeToString(B.serializer(), expectedB)
|
||||
if (json != """{"a":{"s":"OK"}}""") return "Fail: $json"
|
||||
val actualB = Json.decodeFromString(B.serializer(), json)
|
||||
if (expectedB != actualB) return "Fail: $actualB"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user