Mercurial > projects > ddmd
comparison dmd/DotVarExp.d @ 113:3482c73a991b
More cleanup for arrays
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Tue, 31 Aug 2010 23:57:32 +0100 |
parents | acd69f84627e |
children | e28b18c23469 |
comparison
equal
deleted
inserted
replaced
112:3f02152c5e68 | 113:3482c73a991b |
---|---|
66 /* Replace: | 66 /* Replace: |
67 * e1.tuple(a, b, c) | 67 * e1.tuple(a, b, c) |
68 * with: | 68 * with: |
69 * tuple(e1.a, e1.b, e1.c) | 69 * tuple(e1.a, e1.b, e1.c) |
70 */ | 70 */ |
71 Expressions exps = new Expressions; | 71 auto exps = new Expressions; |
72 | 72 |
73 exps.reserve(tup.objects.dim); | 73 exps.reserve(tup.objects.dim); |
74 for (size_t i = 0; i < tup.objects.dim; i++) | 74 foreach (o; tup.objects) |
75 { | 75 { |
76 Object o = cast(Object)tup.objects.data[i]; | |
77 if (auto e = cast(Expression)o) | 76 if (auto e = cast(Expression)o) |
78 { | 77 { |
79 if (e.op != TOK.TOKdsymbol) | 78 if (e.op != TOK.TOKdsymbol) |
80 error("%s is not a member", e.toChars()); | 79 error("%s is not a member", e.toChars()); |
81 else | 80 else |