Virtual

Virtual.member
marks a polymorphic member. Such nonprivate members are used relative to the class of an object. For other members within a method call, the method's class or its parents are scanned for the member, an object's class is irrelevant in this case. The opposite is Real.
This loads the package.
In[1]:=
Click for copyable input
The next example defines a simple set of classes.
In[2]:=
Click for copyable input
By default, fields are only searched for relative to the current calling context. The first access to a is relative to the object, while the second is relative to f that is a member of the base class.
In[3]:=
Click for copyable input
Out[3]=
Out[3]=
We now force polymorphism for nonprivate fields. The Override qualifier is used to emphasize that functionality of a parent class is changed. We must clear child before, because automatic regeneration of it during the redefinition of base is not consistent with the new base.
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
In[6]:=
Click for copyable input
Accordingly, the object's class determines where to search for a field.
In[7]:=
Click for copyable input
Out[7]=
Out[7]=