File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2727,7 +2727,8 @@ struct Slice(size_t _N, _Range)
27272727 Increment `++` and Decrement `--` operators for a $(B fully defined index).
27282728 +/
27292729 auto ref opIndexUnary (string op)(size_t [N] _indexes... )
2730- if (op == ` ++` || op == ` --` )
2730+ // @@@workaround@@@ for Issue 16473
2731+ // if (op == `++` || op == `--`)
27312732 {
27322733 mixin (` return ` ~ op ~ ` _ptr[indexStride(_indexes)];` );
27332734 }
@@ -2742,6 +2743,14 @@ struct Slice(size_t _N, _Range)
27422743 assert (a[1 , 2 ] == 1 );
27432744 }
27442745
2746+ // Issue 16473
2747+ static if (doUnittest)
2748+ unittest
2749+ {
2750+ auto sl = slice! double (2 , 5 );
2751+ auto d = - sl[0 , 1 ];
2752+ }
2753+
27452754 static if (doUnittest)
27462755 pure nothrow unittest
27472756 {
You can’t perform that action at this time.
0 commit comments