Course of Raku / Objects, I/O, and exceptions / Classes and objects / The metaobject protocol 🆕 / Exercises
A diamond of classes
Problem
Define a class A. Then define B and
C that both inherit from A. Finally, define
D that inherits from both B and
C. Print the method resolution order of D as a
list of type names.
Example
The program prints:
(D B C A Any Mu)Solution
Course navigation
← Solution: The method resolution order | Solution: A diamond of classes →