Bug 9921 – Enum variables of type void should be illegal

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-11T09:23:00Z
Last change time
2013-07-24T05:51:35Z
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2013-04-11T09:23:43Z
This compiles, but makes no sense. enum X : void; enum Z : void { Y }; (I already have a patch for this).
Comment #1 by bugzilla — 2013-04-18T11:37:20Z
Comment #2 by github-bugzilla — 2013-04-18T11:39:55Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/35a376547e1c67cd2beddb326bf31210dcf10d8f Fix bug 9921: Disallow void enums. Fix enum.max for errors If the base type isn't valid, don't calculate enum.max