This fails with both beta1 and beta2 of LDC v1.42, but has worked with v1.41 and also works with DMD v2.112.0 and current DMD stable:
enum E { a }
bool[E] aa;
static assert(!__traits(compiles, aa[0])); // would compile since v1.42?!
Of course it wouldn't really compile:
core/internal/newaa.d(172): Error: cannot implicitly convert expression `key` of type `int` to `E`
Weird that this seems to be LDC-specific.