Get unintercepted caller continuation

In a (non-inline) suspending function, we can use suspendCoroutineUninterceptedOrReturn to get the current continuation without intercepting and suspend, but this will force the continuation object to be allocated.

Is there a way to get and suspend with the caller’s continuation, which already exists, so that I don’t have to pay for this allocation?

Maybe return suspendCoroutineUninterceptedOrReturn {...} is recognized as a tail call and it happens automatically? I suspect that is too much to hope for.

Looks like return suspendCoroutineUninterceptedOrReturn {...} does provide the caller continuation, as long as no suspending calls are made in the method. Nice!