<html><body><div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Oct 19, 2025 at 10:27:50 PM, Martin Frb via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:<br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div>Given an non-constrained param, then (in code) any member is assumed to <br>be ok.<br>But in declarations, members of the param can only be used if the <br>compiler knows them.<br><br> generic TGenA<T1,T2> = class<br> X: T1;<br> Y: T2.unknown;<br> end;<br><br>What reason may there be to reject the line for Y?<br></div>
</blockquote>
</div>
<br>
<div dir="ltr">
I agree the compiler can not know that T2.unknown is a valid member before specializing so it should be valid syntax.</div><div dir="ltr"><br></div><div dir="ltr">I think it's just a limitation in the parser. Ideally some subset of typeless syntax should be allowed during the initial parse and only only validated once the the type is specialized.</div></body></html>