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

           Summary: [CTFE] Return fixed-sized matrix
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2010-10-31 14:20:21 PDT ---
This is borderline between enhancement and rejects-valid bug report.

DMD 2.050 doesn't support this code:


int[1][1] foo() {
    int[1][1] a;
    return a;
}
enum int[1][1] m1 = foo();
immutable int[1][1] m2 = foo();
void main() {}


Errors generated:

test.d(2): Error: Slice operation a[] = 0 cannot be evaluated at compile time
test.d(5): Error: cannot evaluate foo() at compile time


This code is very useful to initialize an enum/immutable global matrix.

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

Reply via email to