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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to