www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2311] New: Static destructors in templates are never run

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

           Summary: Static destructors in templates are never run
           Product: D
           Version: 1.034
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: matti.niemenmaa+dbugzilla iki.fi


The assertion in the following code never fires:

template X() { static ~this() { assert (false); } }
void main() { alias X!() x; }

Changing the destructor to a constructor makes it work.


-- 
Aug 24 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2311


matti.niemenmaa+dbugzilla iki.fi changed:

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




------- Comment #1 from matti.niemenmaa+dbugzilla iki.fi  2008-09-03 01:20
-------
Fixed in DMD 1.035.


-- 
Sep 02 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2311





------- Comment #2 from bugzilla digitalmars.com  2008-09-03 01:37 -------
Fixed dmd 1.035 and 2.019


-- 
Sep 02 2008