[Issue 1479] New: mixin error across two module

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 6 06:10:06 PDT 2007


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

           Summary: mixin error across two module
           Product: D
           Version: 1.020
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: redsea at 163.com


the following code would report:

   test.d(8): Error: identifier 'tpl' is not defined.

but if combine the codes into one module, it could be successful compiled.

this bug force me combine many code into one module.

1.018, 1.020, 1.021 all act same.


file test.d
-------------------
module test;
import test1;

template tpl()
{
    alias S2!(tpl) tt;
}

void main()
{
S2!(tpl) v;
}

-------------------
file test1.d
-------------------
module test1;

struct S1(alias t1)
{
    mixin t1!();
}

struct S2(alias t)
{
   alias S1!(t) mytype;

   int i;
}


-- 



More information about the Digitalmars-d-bugs mailing list