https://issues.dlang.org/show_bug.cgi?id=10307 --- Comment #3 from bearophile_hugs at eml.cc --- Now it prints an acceptable error message: test.d(10,16): Error: array operation a[] ^^ cast(double)2 without destination memory not allowed --