Given the type reference to functional type, how w...
# ksp
n
Given the type reference to functional type, how would you use it in generated code so everything is resolved? Right now i resolve reference to KSType and then recursively its type parameters. For plain functional types resolved name is FunctionN, and generated code with those works fine. But for
suspend () -> Unit
SuspendFunction
is unaccessible for user code :c So i think need something that converts
suspend () -> String
->
suspend () -> kotlin.String
. Just want to make sure not to reinvent the wheel.
t
Would you elaborate on "unaccessible for user code"?
n
SuspendFunction
is marked
internal
Oh, or maybe its just IDE. For
suspend () -> Unit
resolved type is
kotlin.coroutines.SuspendFunction0<kotlin.Unit>
and code with this exact FQ name compiles, but IDE cannot find this declaration