enum E1 { A, B }
enum E2 { C, D }
void main() {
E1[2] a;
with (E2)
assert(a[0] == D);
}
Why isn't D able to statically tell when you compare values of
different enums?
How much work is implementing this compile-time test inside the D
front-end?
Thank you, bye, bearophile
