unit uw15591; {$mode objfpc} interface type generic GSmartArray = class private fItems :array of TSomeType; public function Length() :Integer; end; TBooleanSmartArray = specialize GSmartArray; implementation function GSmartArray.Length() :Integer; begin Result := System.Length(fItems); end; end.