fpc/tests/webtbf/tw37303.pp
florian 0cb21e8338 + test for last commit
git-svn-id: trunk@45773 -
2020-07-11 20:31:00 +00:00

38 lines
548 B
ObjectPascal

{ %fail }
program gen_default;
{$mode delphi}
uses SysUtils;
type
TBla = record
Bla: Integer;
end;
//TBla = array[1..4] of Integer;
//TBla = type Integer;
procedure SetValue<T>(out v: T; const aValue: T = Default(T));
begin
v := aValue;
end;
procedure Test;
var
Bla: TBla;
begin
SetValue<TBla>(Bla);
WriteLn(Format('Bla = (Bla: %d)', [Bla.Bla]));
//WriteLn(Format('Bla = (%d, %d, %d, %d)', [Bla[1], Bla[2], Bla[3], Bla[4]]));
//WriteLn('Bla = ', Bla);
end;
begin
Test;
end.