Is there a way to get the return type of a `Kotlin...
# intellij-plugins
a
Is there a way to get the return type of a
KotlinUFunctionCallExpression
(or
PsiMethod
) if the return type is an inline class? When I do this:
(uElement as KotlinUFunctionCallExpression).resolve().returnType
I just get
PsiType:long
but the class is
Copy code
inline class Color(val color: Long) {

}
When I remove the inline keyword, I get the real name of the class.
(uElement as KotlinUFunctionCallExpression).resolveToUElement().sourcePsi as KtDeclaration).type()?.constructor?.declarationDescriptor.parents
seems to get the real type. Not sure if it's the best way though