www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 661] New: Error using a zero-init struct's init property

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=661

           Summary: Error using a zero-init struct's init property
           Product: D
           Version: 0.176
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: dvdfrdmn users.sf.net


---
struct X { int x; }
void main() 
{
    X x;
    x = x.init;
}
---
Compiling yields: Error: cannot implicitly convert expression (0) of type int
to X


-- 
Dec 06 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-12-07:
 http://d.puremagic.com/issues/show_bug.cgi?id=661

 ---
 struct X { int x; }
 void main() 
 {
     X x;
     x = x.init;
 }
 ---
 Compiling yields: Error: cannot implicitly convert expression (0) of type int
 to X

Added to DStress as http://dstress.kuehne.cn/run/s/struct_initialization_08_A.d http://dstress.kuehne.cn/run/s/struct_initialization_08_B.d http://dstress.kuehne.cn/run/s/struct_initialization_08_C.d http://dstress.kuehne.cn/run/s/struct_initialization_08_D.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFd/p2LK5blCcjpWoRAoPmAJ0WkQjHD+t0Mlw89L99In5p9FEYbACfQ6BC ajDLqvHiKnSk31FKpg55UdM= =26Hd -----END PGP SIGNATURE-----
Dec 07 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=661


bugzilla digitalmars.com changed:

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




------- Comment #2 from bugzilla digitalmars.com  2006-12-27 02:01 -------
Fixed DMD 0.178


-- 
Dec 27 2006