Bug 9368 – Final switch on typedef'ed enum is not properly checked
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-22T10:50:00Z
Last change time
2013-01-28T06:10:49Z
Keywords
accepts-invalid, pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich
Comments
Comment #0 by andrej.mitrovich — 2013-01-22T10:50:04Z
enum E
{
a,
b
}
void main()
{
typedef E F;
F f;
final switch (f)
{
case F.a:
}
}
$ dmd -d test.d
>
It should error about a missing case. It's due to a typo in SwitchStatement::semantic, a pull is coming shortly.
Comment #1 by andrej.mitrovich — 2013-01-22T10:55:42Z