www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7855] New: Wrong module dtor order

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

           Summary: Wrong module dtor order
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: code benjamin-thaut.de



PDT ---
Created an attachment (id=1084)
repro case

When using a mixin template, which uses a module thats imported with a public
import, the order the module destructors are called is wrong. The destructor of
the module that is used by the mixin template gets called before the destructor
of the module that uses the mixin template. Therefore the module that uses the
mixin template works on a already destructed version of the module.

See attached repro case.

Tested with dmd 2.058

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 08 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7855


dawg dawgfoto.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dawg dawgfoto.de
         Resolution|                            |INVALID



You mixed "static shared this()" into a class.
As shared and static are not applicable for a constructor


A module constructor needs to be "shared static this()"

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