[Issue 3723] Regression: forward referenced enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 20 11:31:38 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3723
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-01-20 11:31:37 PST ---
I've fixed this by changing the code in mtype.c, line 5984:
Type *TypeEnum::toBasetype()
{
if (sym->scope)
{
- sym->semantic(NULL); // attempt to resolve forward reference
+ sym->trySemantic(NULL); // attempt to resolve forward reference
}
and adding this code to enum.c:
void EnumDeclaration::trySemantic(Scope *sc)
{
unsigned errors = global.errors;
global.gag++;
DsymbolTable *savetable = symtab;
semantic(sc);
global.gag--;
if (errors != global.errors)
{
global.errors = errors;
symtab = savetable;
}
}
--
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