This loads the package.
By default,
$DefaultInheritance is set to
Real, which does not make use of polymorphism.
Here, we define a class hierarchy.
We redefine the classes with a new default inheritance type. It is not sufficient to redefine child only, because the method fun has no notion of the changes in child.
The same can be achieved by an explicit specification. We delete base in oder to avoid a message during automatic regeneration of child.
The assignment
$DefaultInheritance=Virtual mimics the handling of polymorphism in Java.