[Issue 3679] template forward reference regression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 25 02:07:39 PST 2010


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



--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-01-25 02:07:38 PST ---
The regression was caused by adding a couple of lines to
ClassDeclaration::semantic(Scope *sc) in class.c in D1.047.
I think this was probably part of the fix for bug 3170.

Currently line 350 in the D1 source, commenting out the two lines marked '-'
allows this test case to compile again. I think the bug lies elsewhere,
however.

=========


        if (!tc->sym->symtab || tc->sym->scope || tc->sym->sizeok == 0)
        {
            //printf("%s: forward reference of base class %s\n", toChars(),
tc->sym->toChars());
            //error("forward reference of base class %s",
baseClass->toChars());
            // Forward reference of base class, try again later
            //printf("\ttry later, forward reference of base class %s\n",
tc->sym->toChars());
            scope = scx ? scx : new Scope(*sc);
            scope->setNoFree();
-            if (tc->sym->scope)
-                tc->sym->scope->module->addDeferredSemantic(tc->sym);
            scope->module->addDeferredSemantic(this);
            return;
        }

-- 
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