The API specifies that KSValueArgument.value returns an Array of the above listed types, however, if an annotation is given in a Java file as @Anno(args = [arg1, arg2, ...]), then [arg1, arg2, ...] is returned as a java.util.ArrayList<*>. Thus, if you match on the result of KSValueArgument.value and match on any or all of the types declared in the documentation, there is a case where the match is non-exhaustive or rather where you never hit a valid branch.
The fix is to check for the ArrayList<*> type and convert it to a kotlin.Array<*> type.
The API specifies that
KSValueArgument.valuereturns anArrayof the above listed types, however, if an annotation is given in a Java file as@Anno(args = [arg1, arg2, ...]), then[arg1, arg2, ...]is returned as ajava.util.ArrayList<*>. Thus, if you match on the result ofKSValueArgument.valueand match on any or all of the types declared in the documentation, there is a case where the match is non-exhaustive or rather where you never hit a valid branch.ksp/api/src/main/kotlin/com/google/devtools/ksp/symbol/KSValueArgument.kt
Line 55 in 98e422e
The fix is to check for the
ArrayList<*>type and convert it to akotlin.Array<*>type.