Prohibit Array<T> in @Serializable classes
because it's impossible to correctly create array reflectively without knowing correct KClass. Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1243
This commit is contained in:
committed by
Space Team
parent
596949a501
commit
090aec6b3b
@@ -0,0 +1,13 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
// SKIP_TXT
|
||||
import kotlinx.serialization.*
|
||||
|
||||
@Serializable
|
||||
class C(val values: IntArray) // OK
|
||||
|
||||
@Serializable
|
||||
class B(val values: Array<String>) // OK
|
||||
|
||||
@Serializable
|
||||
class A<T>(val values: <!GENERIC_ARRAY_ELEMENT_NOT_SUPPORTED!>Array<T><!>)
|
||||
Reference in New Issue
Block a user