Re: [fpc-pascal] Overriding generic methods

2017-02-10 Thread Ryan Joseph
Of course, I should have known. I’m just recently getting started on generics and finding some uses for them. Thanks. > On Feb 10, 2017, at 3:22 PM, Marco van de Voort wrote: > > After specialization, the method signature now substitutes tobject for T, so > try Regards, Ryan Joseph __

Re: [fpc-pascal] Overriding generic methods

2017-02-10 Thread Marco van de Voort
In our previous episode, Ryan Joseph said: > type > TObjectListAbstract = specialize TList; > TObjectList = class (TObjectListAbstract) > procedure Add (value: T); override; > end; After specialization, the method signature now substitutes tobject for T, so try

[fpc-pascal] Overriding generic methods

2017-02-09 Thread Ryan Joseph
Is overriding methods from specialized generic classes supported in any way? I tried the following below but it doesn’t seem to work. type generic TList = class (TObject) procedure Add (value: T); virtual; end; type TObjectListAbstract = specialize TLi