Why the function cannot be evaluated at compile time? Is it a bug? import std.stdio; char[] foo(A...)() { char[] s = ""; foreach (i, v; A) { static if (i == 1) s = i.stringof; } return s; } void main(char[][] args) { alias foo!("test", 100) f; writefln(f()); // works pragma(msg, f()); // error: cannot evaluate at compile time }