Michael Van Canneyt schrieb:

The reason is explained in the upcoming docs.

Namely: a static method cannot be overridden.

Sure, but virtual methods (including class methods) can be overridden.

The class property is part of this particular class, and descendent classes should not be able to override it's behaviour.

A static class method can call another virtual class method,

No, it cannot. Try it. It was explained to me using this exact example.

Then I missed the "static;" directive in the posted example, added to the getter/setter methods. Delphi introduced that directive after D7, and I found no useful description for it yet. Now it looks to me as if we have to distinguish ordinary static (non-virtual) methods from explicit "static;" methods.

DoDi

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to