Created
September 18, 2016 11:58
-
-
Save controlflow/a8a242e87df5ab6350cfb18a3cbcf1eb 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
T t; | |
U u; | |
if ((t = x.P as T) != null && | |
(u = t.P as U) != null) { | |
// ... use u/t ... | |
} | |
// => | |
if (x.P is T t && | |
t.P is U u) { | |
// ... use u/t ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment