mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:18:12 +02:00
27 lines
329 B
ObjectPascal
27 lines
329 B
ObjectPascal
{$mode objfpc}
|
|
|
|
unit ugeneric7;
|
|
|
|
interface
|
|
|
|
type
|
|
generic tgeneric<t> = class
|
|
l : longint;
|
|
field : t;
|
|
procedure test;
|
|
end;
|
|
|
|
implementation
|
|
|
|
{$R-}
|
|
procedure tgeneric.test;
|
|
begin
|
|
l:=1234;
|
|
{$R+}
|
|
field:=l;
|
|
{$R-}
|
|
writeln(byte(field));
|
|
end;
|
|
{$R+}
|
|
end.
|