Multiple inheritance
- Multiple parent slots yield multiple inheritance.
- All parents are searched. Only one slot must match; otherwise it's an error.
|
Multiple inheritance
Note that traits oddball has more than one parent slot - in fact, it has four. Because
any slot can be a parent, multiple inheritance is achieved through the use of
multiple parents. When a message is sent and cannot be bound to a local slot, all
parents are searched for a matching slot. If more than one slot is found with a
matching name, an error results. It does not matter how many inheritance paths
there are to the slot.
|