mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 21:07:58 +02:00
33 lines
362 B
ObjectPascal
33 lines
362 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tw30832;
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
generic TTest<T> = class
|
|
procedure Test;
|
|
end;
|
|
|
|
procedure TTest.Test;
|
|
begin
|
|
try
|
|
Writeln(Default(T));
|
|
finally
|
|
Writeln('Finally');
|
|
end;
|
|
end;
|
|
|
|
generic procedure Test<T>;
|
|
begin
|
|
try
|
|
Writeln(Default(T));
|
|
finally
|
|
Writeln('Finally');
|
|
end;
|
|
end;
|
|
|
|
begin
|
|
specialize Test<LongInt>;
|
|
end.
|