On 07/01/19 17:32, Mattias Gaertner via fpc-devel wrote:
True, reason is that *non* static means there is a Self.
But since there is no "object of objecttype" and no "record of
recordtype", there is no type for Self in class methods of
objects/record.

Object class methods do have a self parameter. If an object has a vmt, the object class methods get this vmt pointer passed as self parameter. Otherwise they get nil as self parameter. Kylix does not support calling object class methods through tobjecttype.classmethod either, which is indeed kind of strange.

It is not possible to declare a non-static class method (in FPC, at least; Kylix does not support "advanced records", so I cannot test there).


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

Reply via email to