Method type of static class in D2007

XE6 has the following compilations:

type
  TMyProc = procedure(AInt: Integer);

  TMyClass = class
    class procedure Proc(AInt: Integer); static;
  end;

procedure Test;
var
  proc: TMyProc;
begin
  proc := TMyClass.Proc; // error here in D2007
end;

      

In D2007 this gives error E2009 about incompatible types. I know that in D2007, static class methods and global subroutines are not assignable, but is there another way to define TMyProc so that the above will compile in D2007?

+3


source to share





All Articles