Summary: [CTFE] cast from void array allowed with different
                    results than at runtime
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-04-09 14:19:21 PDT ---
DMD 2.058/2.059head

int bar(){
    int[] y = new int[2];
    void[] x = y;
    return (cast(byte[])x)[1];                                              
static assert(!is(typeof({enum _ = (assert(!bar()),1);}))); // fail

The static assertion should pass.

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

Reply via email to