Mercurial > projects > ddmd
diff dmd/TupleDeclaration.d @ 98:5c859d5fbe27
and more
author | Trass3r |
---|---|
date | Tue, 31 Aug 2010 03:53:49 +0200 |
parents | 2e2a5c3f943a |
children | 903b95002d4e |
line wrap: on
line diff
--- a/dmd/TupleDeclaration.d Tue Aug 31 02:12:15 2010 +0200 +++ b/dmd/TupleDeclaration.d Tue Aug 31 03:53:49 2010 +0200 @@ -69,22 +69,28 @@ Arguments args = new Arguments(); args.setDim(objects.dim); OutBuffer buf = new OutBuffer(); + bool hasdeco = 1; for (size_t i = 0; i < objects.dim; i++) { Type t = cast(Type)objects.data[i]; //printf("type = %s\n", t->toChars()); - static if (0) { +static if (false) +{ buf.printf("_%s_%d", ident.toChars(), i); char *name = cast(char *)buf.extractData(); Identifier id = new Identifier(name, TOKidentifier); Argument arg = new Argument(STCin, t, id, null); - } else { +} else { Argument arg = new Argument(STCundefined, t, null, null); - } +} args.data[i] = cast(void *)arg; + if (!t.deco) + hasdeco = false; } tupletype = new TypeTuple(args); + if (hasdeco) + return tupletype.semantic(0, null); } return tupletype;