www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7754] New: static this() in template is stripped during header gen

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

           Summary: static this() in template is stripped during header
                    gen
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dawg dawgfoto.de


--- Comment #0 from dawg dawgfoto.de 2012-03-23 09:29:21 PDT ---
cat > bug.d << CODE
struct Foo(T)
{
    shared static this()
    {
    }

    static this()
    {
    }
}
CODE

dmd -c -o- -H bug.d
cat bug.di

// D import file generated from 'bug.d'
template Foo(T)
{
struct Foo
{
    shared static this();
    static this();
}
}

--------

Thus the static constructors are not run.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 23 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7754


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-03-23 23:37:13 PDT ---
https://github.com/D-Programming-Language/dmd/pull/829

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 23 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7754


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sweatygarlic yahoo.co.jp


--- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2012-03-23 23:52:46 PDT ---
*** Issue 7611 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 23 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7754



--- Comment #3 from github-bugzilla puremagic.com 2012-03-26 22:43:32 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/311d1701d6dc7c454f03fca4d84f62e157e14e5a
Merge pull request #829 from 9rnsr/fix7754

Issue 7754 - static this() in template is stripped during header gen

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 26 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7754


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


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