Bug 7113 – Final switch does not work with shared enum value
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-12-15T06:18:00Z
Last change time
2013-01-08T15:53:16Z
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2011-12-15T06:18:21Z
enum State
{
A,
B,
}
shared State state;
void main()
{
final switch (state)
{
case State.A: break;
case State.B: break;
}
}
---
bug.d(11): Error: enum member A not represented in final switch
bug.d(11): Error: enum member B not represented in final switch
---
Comment #1 by andrej.mitrovich — 2013-01-08T15:53:16Z