This loads the package.
We define a set of classes. The member a is polymorphic at all levels due to the Virtual qualifier, while b is only virtual in base and child (Real interrupts polymorphism). Finally, c is virtual in base and child and again, separated from this, in grandchild and greatgrandchild.
The access to a is always polymorphically. Because the polymorphism is discontinued for b, it ends in class child for all functions located below grandchild. From grandchild on, b is non-polymorphic and gg reads it always from grandchild. For c, the polymorphism is interrupted, but continued again in grandchild. The very last value is due to polymorphism. |