mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-19 04:40:04 +02:00
Fix tuple declarations in aggregates.
This commit is contained in:
@@ -767,13 +767,16 @@ void VarDeclaration::semantic(Scope *sc)
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user