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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 11 04:49:17 PDT 2008


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


svv1999 at hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from svv1999 at hotmail.com  2008-09-11 06:49 -------
dmd handles this case correctly, because overloading the meaning of `void' in
`T= void' with "do not initialize `T'" seems wrong.

An initializer of `T= void' should have the semantics, that declaring a
variable `v' of type `T' without initializer is rejected, as it is exposed in
the example given.

   typedef ubyte B=void;
   B[1] b=0;  // works as expected 


-- 



More information about the Digitalmars-d-bugs mailing list