Thread overview
[Issue 661] New: Error using a zero-init struct's init property
Dec 07, 2006
d-bugmail
Dec 07, 2006
Thomas Kuehne
Dec 27, 2006
d-bugmail
December 07, 2006
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


-- 

December 07, 2006
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


December 27, 2006
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


--