Skip to content

Instantly share code, notes, and snippets.

@ritalin
Created May 19, 2014 09:37
Show Gist options
  • Save ritalin/69f50f74f22fa93f849b to your computer and use it in GitHub Desktop.
Save ritalin/69f50f74f22fa93f849b to your computer and use it in GitHub Desktop.
// OK
IEnexArraycollection = interface(ICollection<TArray<integer>>)
function Op: TEnexExtOps<TArray<integer>>;
end;
// NG
IEnexArrayCollection<T> = interface(ICollection<TArray<T>>)
function Op: TEnexExtOps<TArray<T>>;
end;
@freeonterminate
Copy link

↓これはビルド通りました。構造的には同じだと思います。うーん?

program Project1;

type
IFoo = interface
function GetValue: T;
end;

IBar = interface
function GetValue: T;
end;

TBar = class(TInterfacedObject, IBar)
public
function GetValue: T;
end;

IBaz = interface(IFoo<TArray>)
function Func: TBar<TArray>;
end;

function TBar.GetValue: T;
begin
end;

var
Test: IBaz;

begin
Test.Func;
Readln;
end.

@freeonterminate
Copy link

oh...コメントだと 空白消えちゃうのか…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment