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

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


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


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


dmd 2.042 gives:

test.d(6): Error: Slice operation f.data[] = [1] cannot be evaluated at compile
time
test.d(9): Error: cannot evaluate bar() at compile time
test.d(9): Error: cannot evaluate bar() at compile time

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

Reply via email to