[Issue 23511] Incrementing a not supported type in enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 27 18:40:56 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23511
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |nick at geany.org
Resolution|--- |INVALID
--- Comment #1 from Nick Treleaven <nick at geany.org> ---
> As expected, DMD does not compile this
Yes, though I've tweaked the error message in my local copy as it should be
clearer. (I'll submit it soon).
> nothing in the specification implies that this is not compilable
"If there is no AssignExpression and it is not the first EnumMember, it is
given the value of the previous EnumMember+1. If the value of the previous
EnumMember is EnumBaseType.max, it is an error."
https://dlang.org/spec/enum.html#named_enums
'the value of the previous EnumMember+1' implies that expression must compile.
--
More information about the Digitalmars-d-bugs
mailing list