[Issue 2437] ICE(tocsym.c, !needThis()) - default struct argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 2 12:11:02 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2437
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2009-09-02 12:11:01 PDT ---
The root cause is in func.c, FuncDeclaration::semantic(Scope *sc)
Around line 240, we read:
sd = parent->isStructDeclaration();
if (sd)
{
if (isCtorDeclaration())
{
return; // <============== this is a problem!
}
Returning at this point means that the scope isn't saved. This prevents the
later semantic passes from running, in certain cases. Commenting out the return
prevents the ICE. I haven't yet checked this patch on the test suite, it could
be that additional changes are required. But the problems begin here.
--
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