[Issue 2671] Circular imports and static constructors in templates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 10 03:12:16 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=2671


Walter Bright <bugzilla at digitalmars.com> changed:

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


--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> 2010-03-10 03:12:13 PST ---
I cannot reproduce this on either D1.057 or D2.041.
------ a.d -------
module a;
template Foo(int i)
{
  static this()
  {
  }
}

void main() { }
----- b.d --------
module b;
import a;
alias Foo!(1) foo;
----- c.d --------
module c;
import a;
alias Foo!(2) foo;
------------------
dmd -c a
dmd -c b
dmd -c c
dmd a.obj b.obj c.obj
a
------ this works too ----
dmd a b c
a
-----------------------

-- 
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