diff dmd/declaration.c @ 1367:8026319762be

Merged DMD 1.045 !!!
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Sat, 16 May 2009 22:21:31 +0200
parents 194852badf8c
children e2cf1f67ca33
line wrap: on
line diff
--- a/dmd/declaration.c	Sat May 16 18:37:16 2009 +0200
+++ b/dmd/declaration.c	Sat May 16 22:21:31 2009 +0200
@@ -33,6 +33,7 @@
     storage_class = STCundefined;
     protection = PROTundefined;
     linkage = LINKdefault;
+    inuse = 0;
 }
 
 void Declaration::semantic(Scope *sc)
@@ -253,7 +254,6 @@
     this->hbasetype = NULL;
 #endif
     this->sem = 0;
-    this->inuse = 0;
     this->loc = loc;
 #if IN_DMD
     this->sinit = NULL;
@@ -482,7 +482,9 @@
 	}
     }
     else if (t)
+    {
 	type = t;
+    }
     if (overnext)
 	ScopeDsymbol::multiplyDefined(0, this, overnext);
     this->inSemantic = 0;
@@ -559,7 +561,7 @@
     //static int count; if (++count == 10) *(char*)0=0;
     if (inSemantic)
     {	error("recursive alias declaration");
-//	return this;
+	aliassym = new TypedefDeclaration(loc, ident, Type::terror, NULL);
     }
     Dsymbol *s = aliassym ? aliassym->toAlias() : this;
     return s;
@@ -619,7 +621,6 @@
     offset = 0;
     noauto = 0;
     nestedref = 0;
-    inuse = 0;
     ctorinit = 0;
     aliassym = NULL;
     onstack = 0;
@@ -1399,8 +1400,8 @@
 
 // For the "this" parameter to member functions
 
-ThisDeclaration::ThisDeclaration(Type *t)
-   : VarDeclaration(0, t, Id::This, NULL)
+ThisDeclaration::ThisDeclaration(Loc loc, Type *t)
+   : VarDeclaration(loc, t, Id::This, NULL)
 {
     noauto = 1;
 }