<@U1B4L0D0X>: you could also define a function you...
# language-proposals
u
@arturo: you could also define a function yourself to somehow emulate that "multi let" e.g.
Copy code
// some fields
var x: String? = "asdf"
var y: Int? = null

// somewhere in a method, will only execute if both x and y are not null
let(x, y) { x, y ->
    println(x.length)
    println(y.inc())
}

inline fun <T1 : Any, T2 : Any> let(arg1: T1?, arg2: T2?, block: (T1, T2) -> Unit) =
        if (arg1 != null && arg2 != null) block(arg1, arg2)
        else Unit