mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 05:48:50 +02:00
24 lines
344 B
ObjectPascal
24 lines
344 B
ObjectPascal
program terecs10;
|
|
|
|
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$endif}
|
|
|
|
type
|
|
TTest = record
|
|
function GetTest(Index: Integer): Integer;
|
|
property Test[Index: Integer]: Integer read GetTest; default;
|
|
end;
|
|
|
|
function TTest.GetTest(Index: Integer): Integer;
|
|
begin
|
|
Result := Index;
|
|
end;
|
|
|
|
var
|
|
t: TTest;
|
|
begin
|
|
if t[42] <> 42 then
|
|
halt(1);
|
|
end.
|