vilmos.nagy
01/08/2017, 3:27 PMobject Bar {
var a: MyKlass? = null
fun foo() {
if (a != null) {
a.doSomething() // smart casting won't work here
}
}
}
I usually write a.let { if (it != null) it.doSomething() }
is it a code smell also?