www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2644] New: Unresolved template reference

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

           Summary: Unresolved template reference
           Product: D
           Version: 2.021
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: 2korden gmail.com


//---
module bug.Template;

class Template(T)
{
} 
//---
module bug.A;

import bug.Template;
import bug.B;

alias Template!(bool) TemplateA;
//---
module bug.B;

import bug.Template;
import bug.A;

alias Template!(bool) TemplateB;
//---
module bug.main;
import bug.A;

void main()
{
    auto x = new TemplateA();
}

Compilation order:
dmd -c bug\A.d
dmd -c bug\B.d
dmd -c bug\Template.d
dmd -c bug\main.d

dmd main.obj A.obj B.obj Template.obj

Result:
Error 42: Symbol Undefined _D3bug8Template15__T8TemplateTbZ8Template7__ClassZ

Could be related to issue 2500


-- 
Feb 03 2009