TwoClocks
08/03/2021, 11:21 PMif( thing != null && thing.value > 10)
I can't use thing?.value
because of a known bug in 1.5.20...TwoClocks
08/03/2021, 11:23 PMDamien
08/03/2021, 11:28 PMval myThing = thing
if (myThing != null && myThing.value > 10) foo()
TwoClocks
08/03/2021, 11:40 PMStephan Schroeder
08/04/2021, 6:36 AMlet
:
thing?.let{ myThing->
if(myThing>10) foo()
}
of course you don't have to name your local variable and use it as it
.