[fpc-devel] Status report for "class helpers"

Paul Ishenin webpirat at mail.ru
Sat Jan 29 17:45:06 CET 2011


29.01.2011 23:41, Paul Ishenin wrote:
> I also noticed that you check only unit symtables. I don't know what 
> if you add a class helper into a record/class/object type section?

This code works in delphi:

program Project42;

{$APPTYPE CONSOLE}

type
   TFoo = class
     class procedure DoSomething; static;
   type
     TFooHelper = class helper for TFoo
       class procedure HelpSomehow; static;
     end;
   end;

{ TFoo.TFooHelper }

class procedure TFoo.TFooHelper.HelpSomehow;
begin
   WriteLn('In Help somehow');
end;

{ TFoo }

class procedure TFoo.DoSomething;
begin
   WriteLn('In DoSomething');
end;

begin
   TFoo.DoSomething;
   TFoo.HelpSomehow;
end.

Best regards,
Paul Ishenin



More information about the fpc-devel mailing list