{ %FAIL } unit tw24453; {$mode delphi}{$H+} interface uses Classes, SysUtils; type { TIterator } TIterator = class end; TAncestor = class public type TAncestorIterator = class(TIterator) end; end; TTestClass = class(TAncestor) private // this compiler recognise fAncIterator: TAncestor.TAncestorIterator; protected // this however does not compile, compiler error is // ugenericsnestedclassdeclaration.pas(29,39) Fatal: Syntax error, ";" expected but "." found // the same problem as with result type is with arguments of methods aswell //function GetIterator: TAncestor.TAncestorIterator; // this compile, but not compatible with delphi (at least with delphi XE2, which I am using) function GetIterator: TAncestorIterator; end; implementation function TTestClass.GetIterator: TAncestorIterator; begin Result := fAncIterator; end; end.