www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3675] New: Regression: Struct literals cannot be initialized with another struct literal

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

           Summary: Regression: Struct literals cannot be initialized with
                    another struct literal
           Product: D
           Version: 2.035
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: clugdbug yahoo.com.au


--- Comment #0 from Don <clugdbug yahoo.com.au> 2010-01-05 01:14:34 PST ---
Worked in DMD2.034, fails on 2.035 and later.
And where the heck did the type int come from???
----
struct CopyTest
{
   double x;
}

enum CopyTest z = CopyTest(5.3);
enum CopyTest w = z;
------
bug.d(6): Error: cannot implicitly convert expression ((CopyTest)(5.3)) of type
int to CopyTest

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 05 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3675


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from Don <clugdbug yahoo.com.au> 2010-01-05 04:38:28 PST ---
ROOT CAUSE: This was a bug in my patch to bug 3190.

PATCH:
expression.c, DsymbolExp::semantic(), line 2359.

    if ((v->storage_class & STCmanifest) && v->init)
    {
        e = v->init->toExpression();
-        e->semantic(sc);
+        e = e->semantic(sc);
        return e;
    }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 05 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3675


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com


--- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2010-01-11
22:03:45 PST ---
Changeset 332

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 11 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3675


Walter Bright <bugzilla digitalmars.com> changed:

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


--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2010-01-30
22:47:00 PST ---
fixed dmd 2.040

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