{$MODE OBJFPC} { -*- text -*- } program Test; type generic THashTable = class type THashTableEnumerator = class private function GetCurrent(): TValue; public constructor Create(Owner: THashTable); function MoveNext(): Boolean; property Current: TValue read GetCurrent; end; // ... function GetEnumerator(): THashTableEnumerator; end; function THashTable.THashTableEnumerator.GetCurrent(): THashTable.TValue; begin Result := nil; end; constructor THashTable.THashTableEnumerator.Create(Owner: THashTable); begin end; function THashTable.THashTableEnumerator.MoveNext(): Boolean; begin Result := false; end; function THashTable.GetEnumerator(): THashTableEnumerator; begin Result := nil; end; begin end.