diff dmd/declaration.c @ 1132:76e72fdef04d

Fix tuple declarations in aggregates.
author Christian Kamm <kamm incasoftware de>
date Mon, 23 Mar 2009 14:47:51 +0100
parents b30fe7e1dbb9
children 1860414bf3b7
line wrap: on
line diff
--- a/dmd/declaration.c	Mon Mar 23 01:01:55 2009 +0100
+++ b/dmd/declaration.c	Mon Mar 23 14:47:51 2009 +0100
@@ -767,13 +767,16 @@
 	    VarDeclaration *v = new VarDeclaration(loc, arg->type, id, ti);
 	    //printf("declaring field %s of type %s\n", v->toChars(), v->type->toChars());
 	    v->semantic(sc);
-
+            
+/*
+// removed for LDC since TupleDeclaration::toObj already creates the fields;
+// adding them to the scope again leads to duplicates
 	    if (sc->scopesym)
 	    {	//printf("adding %s to %s\n", v->toChars(), sc->scopesym->toChars());
 		if (sc->scopesym->members)
 		    sc->scopesym->members->push(v);
 	    }
-
+*/
 	    Expression *e = new DsymbolExp(loc, v);
 	    exps->data[i] = e;
 	}