Reduced test case shows it is related to the local import.
Looks as though semantic isn't being run on the array literal.
In the first case, it segfaults because the array literal type is still NULL.
------------------
struct Bug9057(T)
{
T x;
}
void test9507() {
import thug;
Bug9057!(BugInt) xxx;
}
------------------ thug.d, case 1. Segfault
struct BugInt
{
uint[] data = [0];
}
------------------ thug.d, case 2: "Non-constant expression ZEROX"
struct BugInt
{
uint[] data = ZEROX;
}
enum uint [] ZEROX = [0];
Comment #2 by github-bugzilla — 2012-12-10T03:56:00Z