Handle non-reified type parameters of function inside serializer<T>() intrinsic
to match an error message thrown from KType-based serializer<T>(). Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2528
This commit is contained in:
committed by
Space Team
parent
a2cd2200d6
commit
6c6f2ccacd
@@ -0,0 +1,14 @@
|
||||
// CURIOUS_ABOUT: inner, outer
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlinx.serialization.*
|
||||
import kotlinx.serialization.json.*
|
||||
import kotlinx.serialization.modules.*
|
||||
import kotlin.reflect.typeOf
|
||||
|
||||
@Serializable
|
||||
class Box<T>(val t: T)
|
||||
|
||||
inline fun <reified T> inner() = serializer<T>()
|
||||
|
||||
fun <T> outer() = inner<Box<T>>()
|
||||
Reference in New Issue
Block a user