Hi all, is it possible to call a kotlin function f...
# multiplatform
u
Hi all, is it possible to call a kotlin function from swift that expects a suspend lambda parameter? i.e. in kotlin you can pass non-suspending functions where suspending ones are expected. Seems this is not possible from swift and we can not write suspend swift blocks ;-)
e
e.g. you can't write
Copy code
suspend fun wrap(f: suspend () -> Unit) = f()
val f: () -> Unit = {} // non-suspend
wrap(f)
u
thanks, but then i need to wrap on kotlin side. I have a swift lambda though
e
basically there's no auto-conversion on either side
u
thanks. i see