struct S { static int spblit; this(this){ ++spblit; } } void test() { void func(S[3] sa){} S[3] sa; func(sa); // sa should be copied assert(S.spblit == 3); }
https://github.com/D-Programming-Language/dmd/pull/375
Like issue 6636, this fails on 2.059 unless compiled with -release option.
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2f09427e321e1587fdebc983f25f8b4c78cd5f0d Issue 6637 - Postblits of static array elements are not called on function argument call element postblits of static array on function argument