[Issue 884] Segfault in recursive template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 17 02:25:09 PDT 2008


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


matti.niemenmaa+dbugzilla at iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matti.niemenmaa+dbugzilla at ik
                   |                            |i.fi
           Keywords|                            |ice-on-valid-code
           Platform|PC                          |All




------- Comment #2 from matti.niemenmaa+dbugzilla at iki.fi  2008-08-17 04:25 -------
Another testcase, somewhat different (just ran into this in 1.034 on Windows):

template Ins() { const Ins = Ins!(Ins); }
alias Ins!() x;

This was reduced from the following, which should be valid but loops infinitely
(added ice-on-valid-code, since the code is valid, just divergent):

template Ins(alias x) { const Ins = Ins!(Ins); }
alias Ins!(Ins) x;

Doing the following instead makes DMD correctly report a circular reference
error:

template Ins() { const Ins = Ins!(); }
alias Ins!() x;


-- 



More information about the Digitalmars-d-bugs mailing list