<p>Am 10.12.2013 11:53 schrieb "Dennis Poon" <<a href="mailto:dennis@avidsoft.com.hk">dennis@avidsoft.com.hk</a>>:<br>
><br>
> What is the syntax. I could not find it in google.<br>
><br>
> e.g. in unit fgl,<br>
><br>
><br>
> generic TFPGMap<TKey, TData>=class(TFPSMap)<br>
> ....<br>
> end;<br>
><br>
><br>
> How do I define a subclass TMyMap inheriting from TFPGMap without first specializing it?<br>
><br>
> I assumed<br>
><br>
> generic TMyMap <TKey, TData> = class(generic TFPGMap<TKey, TData>)<br>
> ...<br>
> end<br>
><br>
> but fpc 2.6.2 did not accept this.<br>
><br>
> Please help.</p>
<p>The pre-2.7.1 compilers don't support this. In 2.7.1 the syntax is:</p>
<p>generic TMyMap <TKey, TData> = class(specialize TFPGMap<TKey, TData>)<br>
//...<br>
end;</p>
<p>(and yes, it's "specialize", not "generic" and it's working as intended)</p>
<p>Regards,<br>
Sven</p>