summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw18859.pp
blob: f5d229d586df241bc5faf8914a38582f966b2766 (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
{ %OPT=-gh }
Program project1;

{$mode objfpc}
{$h+}

type
  trec = record
    s: string;
  end;

procedure test1(values: array of string);
begin
   if paramcount = 0 then
     values[0] := values[0] + '1'
   else
     values[0] := '1';
end;


procedure test2(values: array of trec);
begin
   if paramcount = 0 then
     values[0].s := values[0].s + '1'
   else
     values[0].s := '1';
end;

var
  tr: trec;

begin
  HaltOnNotReleased := True;
  tr.s := 'test';
  uniquestring(tr.s);
  test1([tr.s]);
  test2([tr]);
end.