CA Gorski wrote on Tue, 07 Aug 2012:

I tried that already, but at least in my case Self is Nil inside the class function.
Compiler (fpc 2.6.1 ) bug?

It does not return nil for me:

***
{$mode objfpc}

type
  TSomething = class
    class function GetMyClass: TClass;
  end;

class function TSomething.GetMyClass: TClass;
begin
  Result:=self;
end;

begin
  writeln(ptrint(TSomething.GetMyClass));
end.
***


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to