Ondrej Pokorny <laza...@kluug.net> schrieb am Fr., 13. Apr. 2018, 21:16:
> On 13.04.2018 14:08, Sven Barth via fpc-devel wrote: > > Ondrej Pokorny <laza...@kluug.net> schrieb am Fr., 13. Apr. 2018, 12:52: > >> I introduced the AS operator for enumerations in >> https://bugs.freepascal.org/view.php?id=33603 >> > > What about enums with holes? > > > No problem because Low() and High() work with these enums as well. See the > test case project I attached to the bug report - it has a test with such an > enum. > I wasn't talking about the boundaries. I meant undefined values inside the enum. If we want such a cast operator to work with such enums as well it should check for invalid values inside the enum, too. Otherwise the operator isn't worth it and should be forbidden for such enums. Regards, Sven
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel