mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-01 19:13:44 +02:00
24 lines
324 B
ObjectPascal
24 lines
324 B
ObjectPascal
program tgeneric18;
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
type
|
|
|
|
{ TFirstGeneric }
|
|
|
|
generic TFirstGeneric<T> = class(TObject)
|
|
end;
|
|
|
|
{ TSecondGeneric }
|
|
|
|
generic TSecondGeneric<T> = class(TObject)
|
|
type public
|
|
TFirstGenericType = specialize TFirstGeneric<T>;
|
|
end;
|
|
|
|
var
|
|
Second: specialize TSecondGeneric<string>;
|
|
begin
|
|
end.
|
|
|