Mercurial > projects > ddmd
comparison dmd/codegen/Util.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 | be2ab491772e |
comparison
equal
deleted
inserted
replaced
74:7e0d548de9e6 | 77:ad4792a1cfd6 |
---|---|
706 else if ((tm = s.isTemplateMixin()) !is null) | 706 else if ((tm = s.isTemplateMixin()) !is null) |
707 { | 707 { |
708 //printf("%s\n", tm.toChars()); | 708 //printf("%s\n", tm.toChars()); |
709 if (tm.members) | 709 if (tm.members) |
710 { | 710 { |
711 for (size_t i = 0; i < tm.members.dim; i++) | 711 foreach(Dsymbol sm; tm.members) |
712 { | |
713 Dsymbol sm = cast(Dsymbol)tm.members.data[i]; | |
714 e = el_combine(e, Dsymbol_toElem(sm, irs)); | 712 e = el_combine(e, Dsymbol_toElem(sm, irs)); |
715 } | |
716 } | 713 } |
717 } | 714 } |
718 else if ((td = s.isTupleDeclaration()) !is null) | 715 else if ((td = s.isTupleDeclaration()) !is null) |
719 { | 716 { |
720 for (size_t i = 0; i < td.objects.dim; i++) | 717 for (size_t i = 0; i < td.objects.dim; i++) |
721 { | 718 { |
722 Object o = cast(Object)td.objects.data[i]; | 719 auto o = cast(Object)td.objects.data[i]; |
723 ///if (o.dyncast() == DYNCAST_EXPRESSION) | 720 ///if (o.dyncast() == DYNCAST_EXPRESSION) |
724 if (Expression eo = cast(Expression)o) | 721 if (Expression eo = cast(Expression)o) |
725 { | 722 { |
726 if (eo.op == TOK.TOKdsymbol) | 723 if (eo.op == TOK.TOKdsymbol) |
727 { | 724 { |