Summary: One missed array literal interpretation as int[2]
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-07-10 15:18:42 PDT ---
I am not sure, but I think this code is correct:

struct Foo {
    int[2] bar;
const(int[2]) spam() {
    const Foo* x;
    return true ? : [10, 20];
void main() {}

But DMD 2.060alpha gives:

test.d(6): Error: cannot implicitly convert expression
(cast(const(int)[])(*x).bar) of type const(int)[] to const(int[2u])

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

Reply via email to