CLOVIS
04/07/2023, 3:31 PMdata class Foo(val a: Int)
val a: Foo? = null
val b = a
?.copy(a = a.a+1) // a is smart-casted here!
?: Foo(0)
println(b)
I thought it wasn't possible without using `let`&co. Playground link.Pablichjenkov
04/07/2023, 4:09 PMYoussef Shoaib [MOD]
04/08/2023, 9:32 PMfun Foo.foo(){
this as Bar
barFunction()
}