[Issue 2464] Correct error message causes incorrect error messages

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Nov 20 18:37:24 PST 2008


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





------- Comment #5 from ary at esperanto.org.ar  2008-11-20 20:37 -------
Ah, right. I see that in FuncExp::semantic there's:

---
if (global.errors)
{
    if (!fd->type->next)
        fd->type->next = Type::terror;
}
---

Which basically says "If there was a previous error, don't infer the type of
the delegate and just set it to return error (well, int)".

There are many checks like this, "If there weren't errors, go on, else, quit
fast". That's because if it wouldn't be like that, you'll get even more errors
than now. :-P

But if errors didn't cause other errors, I believe all these checks could be
removed.


-- 



More information about the Digitalmars-d-bugs mailing list