Created
April 29, 2018 20:17
-
-
Save AaronC81/7799e188b3553105a2c87e7d4d436541 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type | |
X = ref object of RootObj | |
Y = ref object of X | |
func inspect(x: X) = | |
if x is X: | |
echo("It's an X") | |
else: | |
echo("It's a Y") | |
inspect(Y()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment