-
-
Save luanpotter/af4f8a18bb1a6030186bdff095fb1127 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dog? dog = maybeGetDog(); | |
if (dog != null) { // really this is just check for `dog is Dog` | |
dog.bark(); // smart cast to Dog | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment