[Issue 2348] New: T.init == void ==> T[1] rejected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 8 05:53:03 PDT 2008


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

           Summary: T.init == void   ==> T[1] rejected
           Product: D
           Version: 1.035
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: svv1999 at hotmail.com


void main(){
  typedef ubyte B=void;
  B[1] b; // Error: void initializer has no value
}

The initializing procedure for static arrays should be smart enough to not try
to initialize the elements, whenever for the underlying type T `.init' is
`void'.

For dynamic arrays the initializer, changed by the same typedef, seems to be
ignored.


-- 



More information about the Digitalmars-d-bugs mailing list