[fpc-devel] FPC 2.2.3 i386-darwin snapshot
    Jonas Maebe 
    jonas.maebe at elis.ugent.be
       
    Sun Mar  8 12:25:13 CET 2009
    
    
  
On 29 Sep 2008, at 01:48, Felipe Monteiro de Carvalho wrote:
> Could someone please upload 1 snapshot of the latest FPC 2.2.3 to
> ftp://ftp.freepascal.org/pub/fpc/snapshot/fixes/i386-macosx/ ? I would
> be imensely grateful.
>
> I am writing an article about PasCocoa and I need a fix for static
> methods, and also a publicly available installer with the fix.
FWIW, I just discovered that it does not fully work in 2.2.4 either  
(or 2.3.1, for that matter). This does not compile:
$cat tt.pp
{$mode objfpc}
type
  tc = class
    class procedure a; cdecl; static;
    class procedure b; cdecl; static;
  end;
class procedure tc.a; cdecl; static;
begin
  writeln('a');
end;
class procedure tc.b; cdecl; static;
begin
  a;
end;
begin
  tc.b;
end.
$ fpc -St tt.pp
Free Pascal Compiler version 2.2.4 [2009/03/07] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Darwin for i386
Compiling tt.pp
tt.pp(17,4) Error: Illegal expression
tt.pp(23) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
I.e., you cannot call one static class method from inside another one  
(removing the "static" makes it compile).
Jonas
    
    
More information about the fpc-devel
mailing list