callsInPlace

abstract fun <R> callsInPlace(lambda: Function<R>, kind: InvocationKind = InvocationKind.UNKNOWN): CallsInPlace(source)

Specifies that the function parameter lambda is invoked in place.

This contract specifies that:

  1. the function lambda can only be invoked during the call of the owner function, and it won't be invoked after that owner function call is completed;

  2. (optionally) the function lambda is invoked the amount of times specified by the kind parameter, see the InvocationKind enum for possible values.

A function declaring the callsInPlace effect must be inline.

Since Kotlin

1.3