Peter N Lewis wrote:
the in the case of overriding `b.dop' prints `b.p'. but in the case of shadowing it just prints `a.p', because `b.p' beeing a new method gets a new VMT slot, but `b.dop' calls old slot (so old method).
Ok, I think I understand. When is shadowing used?
In Borland Delphi methods are by default shadowed, and overriden only if `override' is given.