https://issues.dlang.org/show_bug.cgi?id=8950
kinke <ki...@gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ki...@gmx.net --- Comment #3 from kinke <ki...@gmx.net> --- Copy ctors are currently (wrongly) ignored when copying static arrays: https://issues.dlang.org/show_bug.cgi?id=20365 This issue here is pretty bad and inconsistent - the postblit is called correctly for mutable copies and scalar non-mutable copies, only non-mutable static array copies ignore the postblit: void main() { static struct S { int x = 42; this(this) { x += 10; } } { S source; S mutableCopy = source; assert(mutableCopy.x == 52); const S constCopy = source; assert(constCopy.x == 52); } { S[1] source; auto mutableCopy = source; assert(mutableCopy[0].x == 52); const constCopy = source; assert(constCopy[0].x == 52); // fails immutable immutableCopy = source; assert(immutableCopy[0].x == 52); // fails } } --