Join Slack
Powered by
No, there will be an unsuccessful cast.
# getting-started
m
miha-x64
04/18/2017, 6:16 PM
No, there will be an unsuccessful cast.
a
aphex
04/18/2017, 7:49 PM
ClassCastException?
k
kevinmost
04/18/2017, 7:50 PM
@aphex
yes, ClassCastException, if you want it to be false you can do
val bar: Boolean = foo ?: false
a
aphex
04/18/2017, 7:54 PM
Thanks 💃
g
gildor
04/19/2017, 1:10 AM
@aphex
or
val bar = foo == true
2
Views
Open in Slack
Previous
Next