Created attachment 1493 [details] Test case According to the documentation at http://dlang.org/operatoroverloading.html slice operators should be rewritten like a.opIndexUnary!("$(METACODE op)")(a.opSlice(i, j)) a.opIndexAssign(c, a.opSlice(i, j)) a.opIndexOpAssign!("$(METACODE op)")(c, a.opSlice(i, j)) but currently this code is not compiled. The test case is in the attachment.
If you want to use new integrated array operator overloading mechanism, you should make the opSlice member function for i..j a template, like as: //Slice opSlice(size_t i, size_t j) // NG Slice opSlice(size_t dim)(size_t i, size_t j) // OK { Slice slice = Slice(i, j); return slice; } After the rewriting, all tests will pass.
I cannot reproduce the failure.