[Issue 4768] Regression(1.056): wrong code with forward declaration of enum
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 13 16:39:33 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4768
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-09-13 16:39:04 PDT ---
mtype.c, line 4110. Basically the same patch as bug 4516.
int TypeEnum::isZeroInit(Loc loc)
{
+ if (!sym->isdone && sym->scope)
+ { // Enum is forward referenced. We need to resolve the whole thing.
+ sym->semantic(NULL);
+ }
+ if (!sym->isdone)
+ {
+ error(loc, "enum %s is forward referenced", sym->toChars());
+ return 0;
+ }
return (sym->defaultval == 0);
}
--
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