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
I'm hitting a ClassCastException when trying to get the return type of the booleanParam() method.
Caused by: java.lang.ClassCastException: class org.jetbrains.kotlin.load.java.descriptors.JavaPropertyDescriptor cannot be cast to class org.jetbrains.kotlin.descriptors.FunctionDescriptor (org.jetbrains.kotlin.load.java.descriptors.JavaPropertyDescriptor and org.jetbrains.kotlin.descriptors.FunctionDescriptor are in unnamed module of loader 'app')
at com.google.devtools.ksp.processing.impl.ResolverImpl.resolveFunctionDeclaration(ResolverImpl.kt:640)
at com.google.devtools.ksp.symbol.impl.java.KSFunctionDeclarationJavaImpl.findOverridee(KSFunctionDeclarationJavaImpl.kt:55)
at androidx.room.compiler.processing.ksp.KSFunctionExtKt.getOriginatingReference(KSFunctionExt.kt:57)
at androidx.room.compiler.processing.ksp.KSFunctionExtKt.returnKspType(KSFunctionExt.kt:35)
at androidx.room.compiler.processing.ksp.KspMethodElement$KspNormalMethodElement$returnType$2.invoke(KspMethodElement.kt:165)
at androidx.room.compiler.processing.ksp.KspMethodElement$KspNormalMethodElement$returnType$2.invoke(KspMethodElement.kt:164)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at androidx.room.compiler.processing.ksp.KspMethodElement$KspNormalMethodElement.getReturnType(KspMethodElement.kt:164)
at androidx.room.compiler.processing.XAnnotationValueTest$tmp$1.invoke(XAnnotationValueTest.kt:762)
at androidx.room.compiler.processing.XAnnotationValueTest$tmp$1.invoke(XAnnotationValueTest.kt:724)
Also note that it's only when processing the annotation as a source -- it works as expected when the using the precompiled class
The text was updated successfully, but these errors were encountered:
This is returned by compiler, probably need to handle it as is. Since resolveFunctionDeclaration is not part of public KSP API, it's probably better to just handle this case at call site of this function, internally.
When processing Java source for an annotation like:
I'm hitting a
ClassCastException
when trying to get the return type of the booleanParam() method.Also note that it's only when processing the annotation as a source -- it works as expected when the using the precompiled class
The text was updated successfully, but these errors were encountered: