summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw38766.pp
blob: 7393d00f91fc78b513221ec25982b44c4b9b2c62 (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
{$mode objfpc}

type
  trec = record
    x, y: longint;
  end;

function max(x,y: longint): longint;
begin
  if x>y then
    result:=x
  else
    result:=y;
end;

function test: trec; inline;
begin
 result.x:=1;
 result.y:=2;
 result.x:=max(result.x,result.y);
end;
    
begin
  if test.x<>2 then
    halt(1);
  if test.y<>2 then
    halt(2);
end.