[Issue 7754] New: static this() in template is stripped during header gen

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 23 09:29:00 PDT 2012


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 at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at 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: -------


More information about the Digitalmars-d-bugs mailing list