fpc/tests/test/tmaclocalprocparam4h.pp
Jonas Maebe 821d0c5d26 * use fact that a method belongs to an objectsymtable to determine that
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 -
2010-08-24 20:30:18 +00:00

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.