Am 28.03.2013 17:48, schrieb kyan:
"Don't allow "static" for class operators or normal methods (except in objects)"

http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=23944

Does this mean that the following code:

{$mode=Delphi}
Note: No "=" here.

type
   TRec = record
     ...
     class function Empty: TRec; static;
     class operator Equal(A, B: TRec): Boolean; inline; static;
   end;

will not compile?
Exactly.

Mind you Sven, in Delphi XE the "static" directive is allowed for
record "class" operators
It does not allow it. This is precisely the point why I forbid it as well.

Delphi compiler error for the "Equal" line:

"E1030 Ungültige Compileranweisung: 'static'"

aka

"E1030 Invalid compiler directive: 'static'"

Tested on Delphi 2007 and XE.

Regards,
Sven
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to