Thread
#multiplatform
    uli

    uli

    1 year ago
    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

    ephemient

    1 year ago
    e.g. you can't write
    suspend fun wrap(f: suspend () -> Unit) = f()
    val f: () -> Unit = {} // non-suspend
    wrap(f)
    uli

    uli

    1 year ago
    thanks, but then i need to wrap on kotlin side. I have a swift lambda though
    e

    ephemient

    1 year ago
    basically there's no auto-conversion on either side
    uli

    uli

    1 year ago
    thanks. i see
    e

    ephemient

    1 year ago