www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4051] New: [CTFE] array struct member item update

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

           Summary: [CTFE] array struct member item update
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2010-04-02 14:48:31 PDT ---
(Not tested with the latest bug fixes, so this can be already fixed)


struct Foo {
    int[1] a;
}
int bar() {
    Foo f;
    f.a[0] = 1;
    return 0;
}
enum int _ = bar();
void main() {}


dmd 2.042 gives:

test.d(6): Error: Index assignment (f.a[0u]) = 1 is not yet supported in CTFE

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 02 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4051


Don <clugdbug yahoo.com.au> changed:

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


--- Comment #1 from Don <clugdbug yahoo.com.au> 2011-04-08 21:18:20 PDT ---
Fixed.
D1:
https://github.com/D-Programming-Language/dmd/commit/ef2a0f1da10331c4de102ca3e029ea1c1c1a46bf

D2:
https://github.com/D-Programming-Language/dmd/commit/0219a5f0dcc88076759a4c472582954d0fb804b0

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