Summary: Problem with fixed-sized associative array key
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-03-07 11:06:18 PST ---
I think this code has to be valid:

void main() {
    auto s = "hello";
    uint[immutable char[4]] aa;
    aa[s[0 .. 4]] = 0;

But DMD 2.059head gives:

test.d(4): Error: cannot implicitly convert expression (s[0u..4u]) of type
string to immutable(char[4u])

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to