<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Am Mi., 9. Jan. 2019, 17:03 hat Ryan Joseph <<a href="mailto:ryan@thealchemistguild.com">ryan@thealchemistguild.com</a>> geschrieben:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Jan 8, 2019, at 3:49 PM, Benito van der Zander <<a href="mailto:benito@benibela.de" target="_blank" rel="noreferrer">benito@benibela.de</a>> wrote:<br>
> <br>
> that reminds me of <a href="https://bugs.freepascal.org/view.php?id=34232" rel="noreferrer noreferrer" target="_blank">https://bugs.freepascal.org/view.php?id=34232</a><br>
<br>
In this case maybe generics should just not give range errors unless they’re specialized? This bug and the problem I have are only for unspecialized generics. That would be the easiest and laziest thing to do but it would mean this would compile:<br>
<br>
type<br>
generic TList<T> = record<br>
list: array[0..0-1] of integer;<br>
end;<br></blockquote></div><div dir="auto"><br></div><div dir="auto">Which is why I said that this is not the way to go. You need to disable range checks only for those symbols that must not use it. Maybe add a "undefined" flag to tconstsym which is set in your tconstsym.create_undefined and not changed when the const type is changed. </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>