1 #!/usr/local/bin/rune -x
3 # Demonstrate an interface (multiple inheritance)
8 alias stdio.File *stdout = stdio.stdout;
13 class HashableListNode {
14 interface ListNode lnode;
15 interface HashNode hnode;
22 # An 'interface' combines a named declaration with an unnamed subclass
23 # definition and also allows a pointer to our class (HashableList)
24 # to be cast to a pointer to the subclass (list in this case).
28 void addTail(HashableListNode @node)
31 hash.super.addHash(node);
37 addHash(HashableListNode @node)
40 list.super.addTail(node);