[fpc-pascal] Scoped enums and inferred types

Sven Barth pascaldragon at googlemail.com
Wed Feb 21 08:01:06 CET 2018

Am 21.02.2018 04:09 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:

Is this a missing feature or do you need to enable it or something?

There is none.

The compiler does not know the type of the parameter, because overload
selection occurs only after all parameters have been parsed. So during
parsing the compiler would not know from which enum type to select the enum
value. Not to mention unsolvable overloads if there would be two enums with
the same value and the same name of the routine.

This also would have the possibility to lead to confusion for the user
(e.g. same case as above or add a variable with the same name into the

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20180221/ce8f34f0/attachment.html>

More information about the fpc-pascal mailing list