Mercurial > projects > ddmd
comparison dmd/EnumDeclaration.d @ 87:b17640f0e4e8
Fixed a bug with a Scope.this(Scope enclosing) being called instead of Scope.clone() method (as a copy ctor replacement)
author | korDen |
---|---|
date | Mon, 30 Aug 2010 19:56:27 +0400 |
parents | 43073c7c7769 |
children | 37b95c347975 |
comparison
equal
deleted
inserted
replaced
83:ee670dd808a8 | 87:b17640f0e4e8 |
---|---|
136 if (memtype.ty == TY.Tenum) | 136 if (memtype.ty == TY.Tenum) |
137 { EnumDeclaration sym = cast(EnumDeclaration)memtype.toDsymbol(sc); | 137 { EnumDeclaration sym = cast(EnumDeclaration)memtype.toDsymbol(sc); |
138 if (!sym.memtype || !sym.members || !sym.symtab || sym.scope_) | 138 if (!sym.memtype || !sym.members || !sym.symtab || sym.scope_) |
139 { | 139 { |
140 // memtype is forward referenced, so try again later | 140 // memtype is forward referenced, so try again later |
141 scope_ = scx ? scx : new Scope(sc); | 141 scope_ = scx ? scx : sc.clone(); |
142 scope_.setNoFree(); | 142 scope_.setNoFree(); |
143 scope_.module_.addDeferredSemantic(this); | 143 scope_.module_.addDeferredSemantic(this); |
144 writef("\tdeferring %s\n", toChars()); | 144 writef("\tdeferring %s\n", toChars()); |
145 return; | 145 return; |
146 } | 146 } |