Mercurial > projects > ddmd
diff dmd/TupleDeclaration.d @ 130:60bb0fe4563e
dmdfe 2.037 first main iteration
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 22:51:44 +0100 |
parents | 1765f3ef917d |
children | e3afd1303184 |
line wrap: on
line diff
--- a/dmd/TupleDeclaration.d Sun Sep 05 15:32:22 2010 +0400 +++ b/dmd/TupleDeclaration.d Thu Sep 09 22:51:44 2010 +0100 @@ -2,7 +2,7 @@ import dmd.common; import dmd.Declaration; -import dmd.Argument; +import dmd.Parameter; import dmd.ArrayTypes; import dmd.TypeTuple; import dmd.Loc; @@ -54,10 +54,8 @@ { /* It's only a type tuple if all the Object's are types */ - for (size_t i = 0; i < objects.dim; i++) + foreach (o; objects) { - Object o = objects[i]; - if (cast(Type)o is null) { //printf("\tnot[%d], %p, %d\n", i, o, o->dyncast()); @@ -67,7 +65,7 @@ /* We know it's a type tuple, so build the TypeTuple */ - Arguments args = new Arguments(); + auto args = new Parameters(); args.setDim(objects.dim); OutBuffer buf = new OutBuffer(); bool hasdeco = 1; @@ -80,9 +78,9 @@ buf.printf("_%s_%d", ident.toChars(), i); char *name = cast(char *)buf.extractData(); Identifier id = new Identifier(name, TOKidentifier); - auto arg = new Argument(STCin, t, id, null); + auto arg = new Parameter(STCin, t, id, null); } else { - auto arg = new Argument(STCundefined, t, null, null); + auto arg = new Parameter(STCundefined, t, null, null); } args[i] = arg; if (!t.deco)