summaryrefslogtreecommitdiff
path: root/tests/test/tmaclocalprocparam4h.pp
blob: da657749859adbe276d9a124a2ebc3c8f32f4a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{$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.