[Issue 4768] Regression(1.056): wrong code with forward declaration of enum

2010-09-21 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4768


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright  2010-09-21 
19:21:45 PDT ---
http://www.dsource.org/projects/dmd/changeset/682

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 4768] Regression(1.056): wrong code with forward declaration of enum

2010-09-13 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4768


Don  changed:

   What|Removed |Added

   Keywords||patch


--- Comment #1 from Don  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: ---