For the following bad code
---
enum E : ubyte { e0, e1, e3, e4 }
void main()
{
switch (node.e)
{
case E.e0: return;
case E.e1: return;
default: return;
}
}
---
DMD reports:
> /tmp/temp_7FAD2C00A670.d:10:13: Error: undefined identifier `node`
> /tmp/temp_7FAD2C00A670.d:13:9: Error: duplicate `case e1` in `switch` statement
The first error message is correct.
The second error message is a bad diagnostic.