On 30 Sep 2011, at 18:27, Paul Ishenin wrote: > This is probably my fault although: > 1. delphi does not support such declarations > 2. we don't have a test for this kind of syntax > > So maybe we had a feature by accident?
Set type is defined as "set of ordinal type": http://www.freepascal.org/docs-html/ref/refsu17.html One kind of ordinal type is a subrange types, which is defined as "constant .. constant": bottom of http://www.freepascal.org/docs-html/ref/refsu5.html Constants can include typecasts (no actual example given at http://www.freepascal.org/docs-html/ref/refse9.html , but it says that they are simply expressions which the compiler must be able to evaluate at compile time (and typecasted constants can be evaluated at compile time). So it's documented behaviour, and it's not unclean, dangerous, etc... > Should I restore that behavior? I think so, yes. Jonas_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal