Am Mi., 9. Jan. 2019, 17:03 hat Ryan Joseph <r...@thealchemistguild.com>
geschrieben:

>
>
> > On Jan 8, 2019, at 3:49 PM, Benito van der Zander <ben...@benibela.de>
> wrote:
> >
> > that reminds me of https://bugs.freepascal.org/view.php?id=34232
>
> 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:
>
> type
>         generic TList<T> = record
>                 list: array[0..0-1] of integer;
>         end;
>

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.

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to