<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>I've actually had this problem myself - sometimes it's quite critical as well because you might want things like<br>
<br>
const<br>
  Pi: Double = <span class="cwcot gsrt" id="cwos">3.14159265359;<br>
</span><div><span class="cwcot gsrt" id="cwos">  HalfPi: Double = Pi / 2;</span></div><div><span class="cwcot gsrt" id="cwos">  TwoPi: Double = 2 * Pi;<br>
</span></div><br>
<div>Will return the illegal expression error as well, even if Pi is fully declared elsewhere, and the only fix was to expand the Pi identifier into the number it represents.  This might be a problem with "pure" functions down the line as well.</div><div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Sun 17/03/19 23:50 , "Ryan Joseph" ryan@thealchemistguild.com sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">I just realized that typed constants exist and may need to be supported as constants for generics but I’ve never used them myself (not sure when they were introduced).
<br>


<br>

First test gives an error so it makes me wonder if they’re buggy and should be allowed for generics. Should they?
<br>


<br>

const
<br>

  kInt: integer = 100;
<br>


<br>

var
<br>

  i: integer = kInt;    // ERROR: Illegal expression
<br>


<br>

They don’t work for generics right now either because they appear as a load node and are not discernible from a variable. Not even sure how to know if a load node is a typed const or what these things really are.
<br>


<br>

Regards,
<br>

        Ryan Joseph
<br>


<br>

_______________________________________________
<br>

fpc-devel maillist  -  <a href="javascript:top.opencompose('fpc-devel@lists.freepascal.org','','','')">fpc-devel@lists.freepascal.org</a>
<br>

<a target="_blank" href="parse.php?redirect=<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a>
<br>

<br>

<br>

</blockquote></HTML>