www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4836] New: "duplicated union initialization" without a union

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

           Summary: "duplicated union initialization" without a union
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: i.kasiuk gmx.de


--- Comment #0 from Ivo Kasiuk <i.kasiuk gmx.de> 2010-09-07 12:49:28 PDT ---
The following compilation error does not seem to make sense:

$ cat test.d
class C {
  string s = null;
  mixin template M() { }
  mixin M!() m1;            // line 4
  mixin template M(T) { }   // line 5
  mixin M!(int) m2;
}
$ dmd -c test
test.d(1): Error: class test.C duplicated union initialization for s
$

Interestingly, the file compiles without error if line 4 and 5 are swapped.

Tested with DMD v2.048

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



--- Comment #1 from Ivo Kasiuk <i.kasiuk gmx.de> 2010-09-08 11:06:48 PDT ---
Also, line 6 seems to have no influence, so the following still does not
compile:

class C {
  string s = null;
  mixin template M() { }
  mixin M!() m1;
  mixin template M(T) { }
}

On the other hand, when replacing "string s = null" by "int i = 0" it compiles
without error.

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


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86_64                      |x86


--- Comment #2 from Brad Roberts <braddr puremagic.com> 2011-02-06 15:40:17 PST
---
Mass migration of bugs marked as x86-64 to just x86.  The platform run on isn't
what's relevant, it's if the app is a 32 or 64 bit app.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 06 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4836


Trass3r <mrmocool gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |mrmocool gmx.de
         Resolution|                            |FIXED


--- Comment #3 from Trass3r <mrmocool gmx.de> 2012-01-06 06:09:18 PST ---
Compiles now.

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