Comment #0 by stanislav.blinov — 2021-11-26T11:55:01Z
As pointed out by @kinke here:
https://forum.dlang.org/post/[email protected]
void main() {
int i;
struct S {
// A copy ctor won't currently compile (dmd 2.098)
// due to "cannot access stack frame pointer..."
this(this) { throw new Exception("!!!"); }
~this() { ++i; }
}
auto a1 = [ S() ];
auto a2 = a1.dup; // throws
} // segmentation fault when destructing a2 because a2[0].tupleof[$-1] is null
Comment #1 by robert.schadek — 2024-12-07T13:41:30Z