jeggy
11/09/2021, 1:23 PMRichard Gomez
11/09/2021, 1:45 PMchannel
is a class property, it could have mutated between the requireNotNull
and usage.
I usually need to do:
val channel = requireNotNull(this.channel)
<http://channel.cd|channel.cd>(..)
//or
channel.?let { // use }
jeggy
11/09/2021, 2:12 PMval channel = requireNotNull(this.channel)
instead of having !!
all the time 🙂ephemient
11/09/2021, 7:20 PMfun foo() {
var bar: Int?
bar = 1
println(bar.inc())
}
but you can't prove that class properties won't be mutated by anybody else