[Issue 1538] New: "template instance forward reference to template declaration"

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 28 14:48:12 PDT 2007


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

           Summary: "template instance forward reference to template
                    declaration"
           Product: D
           Version: 1.021
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: webmaster at villagersonline.com


Take these two files:
  a.d:
    import b;
    struct A(T) {}
  b.d:
    import a;
    struct B {};
    A!(B) foo;

Now b will compile, but a gets an error (in b):
  [russ at russ template_forward_reference]$ dmd -c b.d
  [russ at russ template_forward_reference]$ dmd -c a.d
  b.d(3): template instance forward reference to template declaration A(T)
  b.d(3): Error: A!(B ) is used as a type
  b.d(3): variable b.foo voids have no value
  [russ at russ template_forward_reference]$


-- 



More information about the Digitalmars-d-bugs mailing list