[Issue 1438] Infinite recursive class template expansion

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 23 08:34:47 PDT 2007


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


clugdbug at yahoo.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #2 from clugdbug at yahoo.com.au  2007-10-23 10:34 -------
(In reply to comment #1)
> What exactly is the bug that you're reporting?  As I try it in DMD 1.022, I get
> 
> bz1438.d(4): template instance
> bz1438.A!("bbbbbbbbbbbbbbbbbbbbbb [snip]> bbbbbbbbbbbbbbbx") recursive expansion
> 
> i.e. it eventually realises that the template is infinitely recursive, which
> strikes me as correct behaviour.

You're right. It's simply ugly that the compiler think that it needs to
instantiate every class recursively, when the classes are never used. It'd be
nice to get rid of that (Dummy=void) hack, which has the nasty side-effect that
it allows you to instantiate it as a template, for example as
bar!(int). But it's not a bug.


-- 



More information about the Digitalmars-d-bugs mailing list