Stewart Gordon <> changed:

           What    |Removed                     |Added
           Keywords|                            |rejects-valid, spec

--- Comment #4 from Stewart Gordon <> 2010-03-04 01:24:00 PST ---
Thinking about it now, I think what actually happens is that DMD looks ahead at
the effect of continuing the sequence

sum!(base, base)
sum!(base, sum!(base, base))
sum!(base, sum!(base, sum!(base, base)))

just in case, in order to avoid eating up memory unboundedly and bringing the
system to its knees should this infinite sequence continue.

Trouble is I'm not sure that there's a general way to check in advance whether
the sequence continues, short of solving the halting problem.  But one possible
rule that would cover this case is that, if a template is defined within a
template, then to trigger an infinite recursion error the definition must
instantiate both the outer template and the inner template within this new
instance's scope.

The relevant bit of the spec doesn't forbid what you're doing, so technically
this is rejects-valid.  At the same time, it might be somewhere where the spec
wants looking at.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to