You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling KSAnnotation.toAnnotationSpec() on the doSomething function annotations, KSP will throw:
e: java.lang.ClassCastException: class com.google.devtools.ksp.impl.symbol.kotlin.KSTypeAliasImpl cannot be cast to class com.google.devtools.ksp.symbol.KSClassDeclaration (com.google.devtools.ksp.impl.symbol.kotlin.KSTypeAliasImpl and com.google.devtools.ksp.symbol.KSClassDeclaration are in unnamed module of loader 'app')
at com.squareup.kotlinpoet.ksp.AnnotationsKt.toAnnotationSpec(Annotations.kt:48)
at com.squareup.kotlinpoet.ksp.AnnotationsKt.toAnnotationSpec$default(Annotations.kt:35)...
Expected behavior
I would expect this to work, without errors.
KSAnnotation.toAnnotationSpec() should return resolved annotation
Describe the bug
Consider following scenario:
Calling
KSAnnotation.toAnnotationSpec()
on thedoSomething
function annotations, KSP will throw:Expected behavior
KSAnnotation.toAnnotationSpec()
should return resolved annotationAdditional context
kotlinpoet/interop/ksp/src/main/kotlin/com/squareup/kotlinpoet/ksp/Annotations.kt
Line 48 in 79ec8a4
This seems like it should be a safe cast to KSClassDeclaration
The text was updated successfully, but these errors were encountered: