I'm trying to generate a generic data class and I'm receiving the following error during the build
This is the class
@Serializable
@Keep
data class Node<out T>(
val current: T,
val paths: List<Node<T>>,
)
here is the error:
e: /Users/pablo/Documents/dev/mob1st/bet-app-android/app/build/generated/ksp/debug/kotlin/br/com/mob1st/bet/core/utils/objects/br.com.mob1st.bet.core.utils.objects.Node$CopyMap.kt: (8, 20): Variance annotations are only allowed for type parameters of classes and interfaces
Thanks for reporting this! A fix is on the go in #47, the code was reusing the out from the declaration in the function type, and this is not allowed. But now your code is part of our test suite 😄
I'm trying to generate a generic data class and I'm receiving the following error during the build This is the class
here is the error:
e: /Users/pablo/Documents/dev/mob1st/bet-app-android/app/build/generated/ksp/debug/kotlin/br/com/mob1st/bet/core/utils/objects/br.com.mob1st.bet.core.utils.objects.Node$CopyMap.kt: (8, 20): Variance annotations are only allowed for type parameters of classes and interfaces
Am I doing anything wrong?