www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6693] New: [CTFE] Cannot set value to nested AA

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6693

           Summary: [CTFE] Cannot set value to nested AA
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: youxkei gmail.com



---
pragma(msg, {
    int[int][int] aaa;
    aaa[3][1] = 4;
    return 0;
}());

This code doesn't be compiled by dmd v2.055.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6693


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au



The same thing can happen with dotvar or index expressions.
========================
struct S6693 {
    int[int] m; 
}

static assert({

    int[int][int] aaa;
    aaa[3][1] = 4; // AA

    int[int][3] aab;
    aab[2][1] = 4; // static array

    S6693 s;
    s.m[2] = 4;    // dotvar expression

    return 6693;
}() == 6693);

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 26 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6693


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



23:07:57 PDT ---
https://github.com/D-Programming-Language/dmd/commit/a48007b702870dc7f5915f8aea18f3dc3423d8f3

https://github.com/D-Programming-Language/dmd/commit/9830a15fc2873cb36a6d64980aa018ff98b7c0a7

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