In our previous episode, Ryan Joseph said:
> type  
>       TObjectListAbstract = specialize TList<TObject>;
>   TObjectList = class (TObjectListAbstract)
>               procedure Add (value: T); override;
>       end;    

After specialization, the method signature now substitutes tobject for T, so
try


{$mode objfpc}
type
  generic TList<T> = class (TObject)
                procedure Add (value: T); virtual;
        end;


type
        TObjectListAbstract = specialize TList<TObject>;
        TObjectList = class (TObjectListAbstract)
                procedure Add (value: TObject); override;
        end;

procedure TList.Add (value: T); 
begin
end;

procedure tobjectlist.add(value: TObject);
begin
end;

begin
end.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to