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
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to