[Issue 3867] forward delcaration generates very stange bug

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 2 07:01:59 PST 2010


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



--- Comment #2 from Fawzi Mohamed <fawzi at gmx.ch> 2010-03-02 07:01:57 PST ---
Does further reduction really help the debugging? 
I did try a bit reducing it, but the bug changes a bit, it prints two or three
times the wrong thing, then it comes to the correct result.
I suppose that the problem is that the forward def forces reevaluation, and
sometime the compiler manages to solve the forward def in time (before using
it), some time it doesn't.
So the error disappears or changes depending of the exact sequence of
evaluation.
I know for sure that for my whole code (several files with 1000s of lines) it
always finds a way to fail no matter what I do, unless I remove the forward
defs.
This example stops in a similar way.

>From the number of forward def problems that dmd had I suppose they are treated
a posteriori, with some recursion in some places, and this means that errors
can easily slip in.

What is ugly is that it does not say "you have a forward def that I cannot
handle, so I give up", but it somehow tries to continue and gives a seemingly
fully unrelated error...

if more reduction is needed maybe Matti Niemenmaa can apply his mad reduction
skillz... (please ;-)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list