Markus Gerwinski wrote:
Frank Heckenbach wrote:
BP seems to allow overriding a public method with a private one (and vice versa). Does this seem reasonable?
Only if the privacy degree of the overriding method is _lower_ than that of the the overridden one. E.g. the following declaration would make sense due to the principles of OO programming:
type
a = object protected procedure p; virtual; end; b = object (a) public procedure p; virtual; end;
The other way around -- making a method "more private" -- would contradict the principle of polymorphy.
I agree. (markus9.pas)
Frank