mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00
19 lines
247 B
ObjectPascal
19 lines
247 B
ObjectPascal
{ %fail }
|
|
program tgeneric30;
|
|
|
|
{$mode delphi}
|
|
|
|
type
|
|
TGenericClass<T> = class
|
|
function DoSomething(Arg: T): T;
|
|
end;
|
|
|
|
// it must be TGenericClass<T> here
|
|
function TGenericClass.DoSomething(Arg: T): T;
|
|
begin
|
|
Result := Arg;
|
|
end;
|
|
|
|
begin
|
|
end.
|