[Issue 1438] New: Infinite recursive class template expansion
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Aug 25 16:01:48 PDT 2007
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1438
           Summary: Infinite recursive class template expansion
           Product: D
           Version: 1.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: clugdbug at yahoo.com.au
The code below creates an infinite set of class instances.
Workaround:  templatize every non-template function with a (Dummy=void)
-------
class A(char [] text)
{
    A!("a"~text) foo(T)() { return null; } // OK
    A!("b"~text) bar() {    return null; } // recursive expansion
}
void main()
{
    A!("x") b;
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list