Skip to content

Instantly share code, notes, and snippets.

@tene
Created December 8, 2009 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tene/251807 to your computer and use it in GitHub Desktop.
Save tene/251807 to your computer and use it in GitHub Desktop.
[sweeks@kweh parrot]$ cat subclass.pir
.sub main :main
.local pmc c, sc, a
c = get_class ['Integer']
sc = subclass c, 'MyInt'
a = new sc
a = 5
say a
$S0 = typeof a
say $S0
.end
[sweeks@kweh parrot]$ ./parrot subclass.pir
5
MyInt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment