[fpc-pascal] STATIC can only be used on non-virtual class methods

silvioprog silvioprog at gmail.com
Fri Apr 15 18:38:26 CEST 2016


Hello,

Consider the following code:

=== test begin ===

{$MODE DELPHI}

  TStaticVirtualTest = class sealed(TObject)
  public
    class procedure Test; virtual; static;
  end;

class procedure TStaticVirtualTest.Test;
begin
end;

=== test end ===

You can compile it in FPC (trunk), but, when you try to compile it on
Delphi (Seattle):

=== error begin ===

E2376 STATIC can only be used on non-virtual class methods

=== error end ===

Is this a FPC bug?

Thank you!

-- 
Silvio Cl├ęcio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160415/ae7e9035/attachment.html>


More information about the fpc-pascal mailing list