int bug4257(ref int x) { return 3; } void bug4257b(int y) { static assert(bug4257(y)); } -------- assert interpret.c(190) istate And if it's not a reference parameter, it compiles but generates wrong code. This is the root cause of bug 3809, for example.
http://www.dsource.org/projects/dmd/changeset/517