The following code comiples, but results a segmentation fault. The problem is caused by the initialisation of the associative arrays with array literals. (Initialising the arrays with "null" eliminates the segmentation fault.)
-----------------------------8<-----------------------------------------
import std.stdint: uint_fast64_t;
typedef uint_fast64_t FOO;
class A
{
static invariant FOO fooValue1;
static invariant FOO fooValue2;
static invariant FOO[string] fooArray;
static invariant string[FOO] strArray;
static this()
{
fooValue1 = cast(FOO) 0x8000000000000000LU;
fooValue2 = cast(FOO) 0x4000000000000000LU;
fooArray = ["s1":fooValue1, "s2":fooValue2];
strArray = [fooValue1:"s1", fooValue2:"s2"];
}
};
int main(string[] args)
{
auto a = new A;
return 0;
}
-----------------------------8<-----------------------------------------