[Issue 14302] New: New style opSlice doesn't compile
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Mar 17 12:28:11 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14302
Issue ID: 14302
Summary: New style opSlice doesn't compile
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: dieselmachine at mail.ru
Created attachment 1493
--> https://issues.dlang.org/attachment.cgi?id=1493&action=edit
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.
--
More information about the Digitalmars-d-bugs
mailing list