Ali Çehreli:
I thought that it was a bug that the compiler does not construct an object and call opCall() on it.
In the D front-end there are some well known bugs regarding opCall (and I think there is a patch too).
Works if the two 'static if' blocks are connected with an else: static if (is (T : int)) { enum Foo = [ T.init, T.init ];} else static if (is (T : long)) { // <-- else makes it compileenum Foo = [ T.init ]; }
I think the problem is different: http://dpaste.dzfl.pl/86bcd51a Bye, bearophile
