Skip to content

Instantly share code, notes, and snippets.

@freeonterminate
Created May 19, 2014 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freeonterminate/40838f2e09505692e3ea to your computer and use it in GitHub Desktop.
Save freeonterminate/40838f2e09505692e3ea to your computer and use it in GitHub Desktop.
こうすると正しくコンパイルエラー
program Project1;
type
TFoo<T> = class; // interface から class に変えた
TBaz<T> = record
Value: TFoo<TArray<T>>; // E2604 ジェネリック型を再帰的に使用しています
end;
TFoo<T> = class
function Baz: TBaz<T>;
end;
function Test: TBaz<Integer>;
begin
Result.Value.Baz;
end;
begin
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment