[Issue 23511] New: Incrementing a not supported type in enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 26 11:19:24 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23511
Issue ID: 23511
Summary: Incrementing a not supported type in enum
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: porton at narod.ru
As expected, DMD does not compile this:
enum {
string A = "12",
B,
}
But AFAIK nothing in the specification implies that this is not compilable. I
can devise other possible interpretations of the specification than being not
compilable, for example, undefined behavior.
Need to say in the specification that stuff like this does not compile.
--
More information about the Digitalmars-d-bugs
mailing list