Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Comparable<T> --> Animal --> Cat
- +---> Dog
- Animal cat = new Cat();
- Animal dog = new Dog();
- cat.Compare(dog); // ERR
- type Animal ... compare(cmp Self) ...
- type Cat ... compare(cmp Self) ...
- type Dog ... compare(cmp Self) ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement