www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1479] New: mixin error across two module

reply d-bugmail puremagic.com writes:

           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 digitalmars.com
        ReportedBy: redsea 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;

Sep 06 2007
parent d-bugmail puremagic.com writes:

matti.niemenmaa+dbugzilla iki.fi changed:

           What    |Removed                     |Added
            Version|1.020                       |1.018

------- Comment #1 from matti.niemenmaa+dbugzilla iki.fi  2007-09-06 09:30
Please set the oldest applicable version:

Sep 06 2007