why a class method of a record without the static keyword raise E2998 error ?
why a class method of a record without the static keyword raise E2998 error ?
AFAIK it can not be anything else then static ?!
AFAIK it can not be anything else then static ?!
Then why not declare it as static? Let's save the non-static declaration for some future enhancement.
ReplyDeleteUwe Raabe You mean if we ever get record inheritance and non static "class" methods where Self is the type of the record? :)
ReplyDeleteStefan Glienke You never know...
ReplyDeleteThere is no E2998, so I guess you mean E2398? docwiki.embarcadero.com - E2398 Class methods in record types must be static (Delphi) - RAD Studio (list is at http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Error_and_Warning_Messages_(Delphi) )
ReplyDeleteJeroen Wiert Pluimers yes, it's well documented BTW
ReplyDeletedocwiki.embarcadero.com - E2398 Class methods in record types must be static (Delphi) - RAD Studio