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