Skip to content

functionType

context(session: KaSession)
val KtFunction.functionType: KaType

The function type of the given KtFunction.

For a regular function, the result is a kotlin.FunctionN<P1, P2, ..., R> type where:

  • N is the number of value parameters in the function.

  • Px is the type of the x-th value parameter.

  • R is the return type of the function.

Depending on the function's attributes, such as suspend or reflective access, a different functional type such as SuspendFunction, KFunction, or KSuspendFunction will be constructed.