[Issue 8390] New: Refused array operation mutable[] += const[]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 15 07:48:18 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8390

           Summary: Refused array operation mutable[] += const[]
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2012-07-15 07:48:17 PDT ---
See Issue 4662 for some context.


void main() {
    const int[] a = new int[5];
    int[] b = new int[5];
    b[] += a[];
}


Gives, DMD 2.060alpha:
test.d(4): Error: slice cast(const(int)[])b[] is not mutable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list