<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Bart via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> schrieb am Sa., 9. Jan. 2021, 05:17:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Jan 8, 2021 at 9:00 PM Sven Barth via fpc-devel<br>
<<a href="mailto:fpc-devel@lists.freepascal.org" target="_blank" rel="noreferrer">fpc-devel@lists.freepascal.org</a>> wrote:<br>
<br>
>> It seems I cannot use a stand-alone function that is declared in the<br>
>> implementation of the unit?<br>
<br>
> Generics are a stream of tokens that is reparsed when specialized. Functions declared in the implementation section are simply not available then thus its forbidden right away. This is Delphi compatible.<br>
<br>
Thanks for explaining this.<br>
The errormessage is probably technically correct, but for me it might<br>
be a little more informative (so that I can tell what I did wrong).<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Right click the error message in Lazarus, then click "Help". For me a dialog with the following text appeared:</div><div dir="auto"><br></div><div dir="auto">"A generic declared in the interface section of a unit must not reference symbols that belong solely to the implementation section of that unit."</div><div dir="auto"><br></div><div dir="auto">The *why* is not important for users. Those that are interested can ask, just like you did. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>