Mercurial > projects > ddmd
diff dmd/StructDeclaration.d @ 138:90821c10b6a7
2.039
author | Trass3r |
---|---|
date | Tue, 14 Sep 2010 00:00:24 +0200 |
parents | af1bebfd96a4 |
children | bc45b1c53019 |
line wrap: on
line diff
--- a/dmd/StructDeclaration.d Mon Sep 13 23:29:00 2010 +0200 +++ b/dmd/StructDeclaration.d Tue Sep 14 00:00:24 2010 +0200 @@ -106,17 +106,22 @@ { Scope sc2; - //printf("+StructDeclaration.semantic(this=%p, '%s')\n", this, toChars()); + //writef("+StructDeclaration.semantic(this=%p, '%s', sizeok = %d)\n", this, toChars(), sizeok); - //static int count; if (++count == 20) *(char*)0=0; + //static int count; if (++count == 20) halt(); assert(type); if (!members) // if forward reference return; - if (symtab) - { if (!scope_) + if (sizeok == 1 || symtab) + { + if (!scope_) + { + // writef("already completed\n"); + scope_ = null; return; // semantic() already completed + } } else symtab = new DsymbolTable(); @@ -367,7 +372,7 @@ scope_ = scx ? scx : sc.clone(); scope_.setNoFree(); scope_.module_.addDeferredSemantic(this); - //printf("\tdeferring %s\n", toChars()); + writef("\tdeferring %s\n", toChars()); return; }