Test case: int f() { struct FixedStack(T) { T[] arr; //commenting out this constructor makes it work this(T[] storage){ arr = storage; } } auto counterRange = FixedStack!uint(new uint[22]); return 0; } enum k = f(); dmd's output: struct.d(9): Error: CTFE internal error assigning struct struct.d(13): Error: cannot evaluate f() at compile time
I ran into this a while ago: import std.algorithm; void main(){ size_t findi(string s){ return countUntil(s,'d'); }; enum x = map!findi(["a","b"]); } on my example dmd also segfaults.
*** This issue has been marked as a duplicate of issue 6419 ***