-
Notifications
You must be signed in to change notification settings - Fork 652
Open
Labels
External generated serializerEverything related to external auto-generated serializer (@Serializer annotation)Everything related to external auto-generated serializer (@Serializer annotation)Priority: 3bugcompiler-plugin
Description
Describe the bug
When using @Serializer
, the following exception is thrown when trying to get an element descriptor.
java.lang.IndexOutOfBoundsException: Example descriptor has only 1 elements, index: 0
To Reproduce
data class Example(
val value: String
)
@Serializer(Example::class)
object ExampleSerializer
fun main() {
println(ExampleSerializer.descriptor.getElementName(0)) // Everything is fine here
println(ExampleSerializer.descriptor.getElementDescriptor(0)) // IndexOutOfBoundsException
}
Expected behavior
Method SerialDescriptor::getElementDescriptor
should return a SerialDescriptor
.
Environment
- Kotlin version: 1.3.72
- Library version: 0.20.0
- Kotlin platforms: JVM
- Gradle version: 6.4.1
Metadata
Metadata
Assignees
Labels
External generated serializerEverything related to external auto-generated serializer (@Serializer annotation)Everything related to external auto-generated serializer (@Serializer annotation)Priority: 3bugcompiler-plugin