https://issues.dlang.org/show_bug.cgi?id=21482
--- Comment #1 from dave287091 at gmail.com ---
I have discovered that a workaround is as follows:
int f_4(int a){
enum int[]foo_ = [1,2,3];
enum int[foo_.length]foo = foo_;
if(__ctfe)
return foo[a];
return 4;
}
--