Mercurial > projects > ddmd
diff dmd/AttribDeclaration.d @ 77:ad4792a1cfd6
more D-ification container accessing
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Sun, 29 Aug 2010 14:36:55 +0100 |
parents | 7e0d548de9e6 |
children | 43073c7c7769 |
line wrap: on
line diff
--- a/dmd/AttribDeclaration.d Sun Aug 29 09:43:40 2010 +0100 +++ b/dmd/AttribDeclaration.d Sun Aug 29 14:36:55 2010 +0100 @@ -34,12 +34,6 @@ { foreach(s; d) m |= s.addMember(sc, sd, m | memnum); -/* for (uint i = 0; i < d.dim; i++) - { - auto s = d[i]; - m |= s.addMember(sc, sd, m | memnum); - } - */ } return m; @@ -63,11 +57,8 @@ newsc.explicitProtection = explicitProtection; newsc.structalign = structalign; } - for (uint i = 0; i < decl.dim; i++) - { - Dsymbol s = cast(Dsymbol)decl.data[i]; + foreach(Dsymbol s; decl) s.setScope(newsc); // yes, the only difference from semanticNewSc() - } if (newsc != sc) { sc.offset = newsc.offset; @@ -94,11 +85,8 @@ newsc.explicitProtection = explicitProtection; newsc.structalign = structalign; } - for (uint i = 0; i < decl.dim; i++) - { - Dsymbol s = cast(Dsymbol)decl.data[i]; + foreach(Dsymbol s; decl) s.semantic(newsc); - } if (newsc != sc) { sc.offset = newsc.offset;