Unfortunately `fruit as Apple` will throw if `frui...
# getting-started
e
Unfortunately
fruit as Apple
will throw if
fruit
isn't an
Apple
. But thanks to smart casts you can do
if (fruit is Apple) { fruit.anAppleMethod() }