Skip to content

Instantly share code, notes, and snippets.

@AaronC81
Created April 29, 2018 20:17
Show Gist options
  • Save AaronC81/7799e188b3553105a2c87e7d4d436541 to your computer and use it in GitHub Desktop.
Save AaronC81/7799e188b3553105a2c87e7d4d436541 to your computer and use it in GitHub Desktop.
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