On Thu, 27 Feb 2014, Hans-Peter Diettrich wrote:
Michael Van Canneyt schrieb:
So what's the special use of a *class* property? If it exists for Delphi
compatibility only, why then is it handled differently from "property"?
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.
so this protection looks very artifical to me.
Nevertheless, this is the reason.
Michael.
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel