struct Foo{ int[] i; } bool func(){ Foo foo; foo.i ~= 1; foo.i ~= 2;//Compile fails on this line. return true; } When I compiled this source code, compile of dmd v2.054 built from trunk failed. Error: foo.i ~= 2 cannot be evaluated at compile time This may shows that operator ~= or array in CTFE has wrong behavior.
https://github.com/D-Programming-Language/dmd/commit/0904c8aa200e4d080d500d96d5904c33ba17cc86 https://github.com/D-Programming-Language/dmd/commit/e48a8c67f02172c72e04f36759d2d6868d716368
*** Issue 6435 has been marked as a duplicate of this issue. ***