For KotlinPoet, if I got a `KSFunctionDeclaration`...
# squarelibraries
s
For KotlinPoet, if I got a
KSFunctionDeclaration
which I know I want to call inside of the body of a function I am generating, is there a way for me to do that in a better way that just doing something like this:
Copy code
fun FileSpec.Builder.foo() {
  addImport(ksFunctionDeclaration.packageName.asString() + ksFunctionDeclaration.simpleName.asString())
  addFunction(
    FunSpec
      .builder()
      // stuff
      .addStatement("${ksFunctionDeclaration.simpleName}()")
      .build()
  )
}
I feel like I must be missing some part of the API that simplifies this. or am I wrong?