May 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6006

           Summary: Complex numbers initialized with 0
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2011-05-15 07:37:27 PDT ---
Just like float/double/real variables can be initialized with just a "0", I suggest to allow cdoubles/cfloats/creals too to be initialized with just a "0" (that equals to 0+0i):


void main() {
    double d = 0;      // OK
    cdouble c1 = 0+0i; // OK
    cdouble c2 = 0;    // error
}


DMD 2.053 gives the error:
test.d(4): Error: cannot implicitly convert expression (0) of type int to
cdouble

This is useful for generic code.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 15, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6006


kennytm@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |kennytm@gmail.com
         Resolution|                            |DUPLICATE


--- Comment #1 from kennytm@gmail.com 2011-05-15 09:33:08 PDT ---
*** This issue has been marked as a duplicate of issue 692 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------