thijs
09/13/2016, 6:43 AMif let
construct from Swift. I'd love to be able to do something like this in Kotlin:
class Foo {
var bar: String? = //...
var foo: String? = //...
fun someMethod() {
if (val bar = bar, val foo = foo) {
// bar and foo are now non-optional
}
}
}