Created
April 29, 2018 20:34
-
-
Save dom96/c50e624e65e4580de32378281345c5bf 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 | |
| proc inspect(x: X) = | |
| if not(x of Y): | |
| 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