Bart
2018-12-02 22:28:00 UTC
Hi,
{ TFoo }
generic TFoo<T> = class
procedure Bar;
end;
{ TFoo }
procedure TFoo.Bar;
procedure localproc;
begin end;
begin
end;
This will not compile (fpc 3.0.4):
gentest.lpr(35,4) Error: Generic methods cannot have nested procedures
While the message is clear, the reason for this is not (to me at last).
Does anybody know why?
Bart
{ TFoo }
generic TFoo<T> = class
procedure Bar;
end;
{ TFoo }
procedure TFoo.Bar;
procedure localproc;
begin end;
begin
end;
This will not compile (fpc 3.0.4):
gentest.lpr(35,4) Error: Generic methods cannot have nested procedures
While the message is clear, the reason for this is not (to me at last).
Does anybody know why?
Bart
--
Bart
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman
Bart
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman