<div dir="ltr"><div>Is there any entry on Mantis for me to keep track of this bug status?<br><br></div>Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 20, 2016 at 6:03 PM, Sven Barth <span dir="ltr"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Am 20.11.2016 08:31 schrieb "Le Duc Hieu" <<a href="mailto:alaviss0@gmail.com" target="_blank">alaviss0@gmail.com</a>>:<br>
><br>
> Here is the complete snippet that i wanted to create<br>
><br>
><br>
> Type<br>
> generic PGList<T> = ^specialize TGList<T>;<br>
><br>
> generic TGList<T> = record<br>
> data: T;<br>
> next: specialize PGList<T><br>
> end;</p>
<p>You'll need to use nested types (they require modeswitch advancedrecords), like this:</p>
<p>=== code begin ===</p>
<p>type<br>
generic TGList<T> = record<br>
public type<br>
TSelf = specialize TGList<T>;<br>
PGList = ^TSelf;<br>
public<br>
data: T;<br>
next: PGList;<br>
end;</p>
<p>=== code end ===</p>
<p>Note: the TSelf construct is currently needed due to a bug in the compiler.</p>
<p>Regards,<br>
Sven</p>
<br>______________________________<wbr>_________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.<wbr>org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="noreferrer" target="_blank">http://lists.freepascal.org/<wbr>cgi-bin/mailman/listinfo/fpc-<wbr>pascal</a><br></blockquote></div><br></div>