Join Slack
Powered by
when you use `as?` that will effectively wrap it i...
# getting-started
t
trevjones
05/22/2017, 3:22 PM
when you use
as?
that will effectively wrap it in a try catch and return null if the cast fails
o
orangy
05/22/2017, 3:25 PM
That’s incorrect, it is equivalent to
if (a is X) a else null
a
adam-mcneilly
05/22/2017, 3:26 PM
Oooh that's even better.
t
trevjones
05/22/2017, 3:27 PM
clarification much appreciated. I have never looked at the output bytecode
4
Views
Open in Slack
Previous
Next