Calling KSAnnotation.arguments for an annotation with arguments fails with KSP2 on non-Jvm targets with the following error:
java.lang.NullPointerException: null cannot be cast to non-null type org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
at com.google.devtools.ksp.impl.symbol.kotlin.UtilKt.getDefaultValue(util.kt:430)
at com.google.devtools.ksp.impl.symbol.kotlin.KSAnnotationImpl$defaultArguments$2.invoke(KSAnnotationImpl.kt:88)
at com.google.devtools.ksp.impl.symbol.kotlin.KSAnnotationImpl$defaultArguments$2.invoke(KSAnnotationImpl.kt:71)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.google.devtools.ksp.impl.symbol.kotlin.KSAnnotationImpl.getDefaultArguments(KSAnnotationImpl.kt:71)
at com.google.devtools.ksp.impl.symbol.kotlin.KSAnnotationImpl$arguments$2.invoke(KSAnnotationImpl.kt:65)
at com.google.devtools.ksp.impl.symbol.kotlin.KSAnnotationImpl$arguments$2.invoke(KSAnnotationImpl.kt:62)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.google.devtools.ksp.impl.symbol.kotlin.KSAnnotationImpl.getArguments(KSAnnotationImpl.kt:62)
Repro: DennisTsar@8449e19
This seems similar to #1798 , but does not involve Java in any way.
Calling
KSAnnotation.argumentsfor an annotation with arguments fails with KSP2 on non-Jvm targets with the following error:Repro: DennisTsar@8449e19
This seems similar to #1798 , but does not involve Java in any way.