Enum values are not strongly typed, so final switch is not compile-time exhaustive.
enum E
{
a = 2,
b = 3
}
unittest
{
E e = E.b;
e++;
e *= 2;
//[email protected](13): No appropriate switch clause found
final switch (e)
{
case E.a, E.b:
}
e = E.b ^ E.a;
assert(e == 1);
assert(e >= E.min); //fails
}
Enum values are not strongly typed, so final switch is not compile-time exhaustive.