mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:38:14 +02:00

it is a method (_class is also set for nested procedures of methods), resolves problem reported in http://lists.freepascal.org/lists/fpc-pascal/2010-August/026259.html git-svn-id: trunk@15898 -
40 lines
586 B
ObjectPascal
40 lines
586 B
ObjectPascal
{$mode macpas}
|
|
type
|
|
myObject = object
|
|
procedure procA (x: integer);
|
|
procedure procC (procedure procD (var y: myObject));
|
|
end;
|
|
|
|
procedure myObject. procC (procedure procD (var y: myObject));
|
|
var
|
|
x: myobject;
|
|
begin
|
|
procD (x);
|
|
{more code here ...}
|
|
end;
|
|
|
|
var
|
|
ok: boolean;
|
|
|
|
procedure myObject.ProcA (x: integer);
|
|
|
|
procedure ProcB (var y: myObject);
|
|
begin
|
|
ok:=true;
|
|
end;
|
|
|
|
begin
|
|
procC(ProcB);
|
|
end;
|
|
|
|
var
|
|
o: myobject;
|
|
begin
|
|
ok:=false;
|
|
new(o);
|
|
o.proca(1);
|
|
dispose(o);
|
|
if not ok then
|
|
halt(1);
|
|
end.
|