[Issue 4019] New: [CTFE] Adding an item to an AA

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 28 06:30:22 PDT 2010


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

           Summary: [CTFE] Adding an item to an AA
           Product: D
           Version: future
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-03-28 06:30:20 PDT ---
Problem found in dmd 2.042. This doesn't compile:

int foo() {
    int[int] aa;
    aa[1] = 2;
    return 0;
}
enum _ = foo();
void main() {}


Giving the errors:

test.d(3): Error: Cannot index null array aa
test.d(6): Error: cannot evaluate foo() at compile time
test.d(6): Error: cannot evaluate foo() at compile time

-- 
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