diff dmd/mtype.c @ 1630:44b145be2ef5

Merge dmd 1.056.
author Robert Clipsham <robert@octarineparrot.com>
date Sat, 06 Feb 2010 15:53:52 +0000
parents e83f0778c260
children 9bf06e02070b
line wrap: on
line diff
--- a/dmd/mtype.c	Wed Jan 06 19:53:35 2010 +0100
+++ b/dmd/mtype.c	Sat Feb 06 15:53:52 2010 +0000
@@ -4061,8 +4061,15 @@
 Type *TypeEnum::toBasetype()
 {
     if (sym->scope)
-    {
-	sym->semantic(NULL);	// attempt to resolve forward reference
+    {	// Enum is forward referenced. We don't need to resolve the whole thing,
+	// just the base type
+	if (sym->memtype)
+	{   sym->memtype = sym->memtype->semantic(sym->loc, sym->scope);
+	}
+	else
+	{   if (!sym->isAnonymous())
+		sym->memtype = Type::tint32;
+	}
     }
     if (!sym->memtype)
     {