Thread overview
[Issue 7882] New: Cannot initialize static array member in ctor
April 10, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7882

           Summary: Cannot initialize static array member in ctor
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: hsteoh@quickfur.ath.cx


--- Comment #0 from hsteoh@quickfur.ath.cx 2012-04-09 18:56:12 PDT ---
Code:

struct S {
    const(int)[4] data;
    this(const(int)[4] d) {
        data = d;
    }
}

void main() {
    S s;
}

Compiler output:

test.d(4): Error: slice this.data[] is not mutable

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 10, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7882



--- Comment #1 from hsteoh@quickfur.ath.cx 2012-04-09 19:42:22 PDT ---
Probably duplicate of bug 6174.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 10, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7882


hsteoh@quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from hsteoh@quickfur.ath.cx 2012-04-09 19:42:42 PDT ---
*** This issue has been marked as a duplicate of issue 6174 ***

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