Merge DMD r321: bugzilla 3575 CTFE: member structs not initialized correctly

---
 dmd/expression.c |    4 +---
 dmd/interpret.c  |   32 +++++++++-----------------------
 dmd/mtype.c      |   48 +++++++++++++++++++++++++++++++++++++++++++-----
 dmd/mtype.h      |    2 ++
 4 files changed, 55 insertions(+), 31 deletions(-)
This commit is contained in:
Leandro Lucarella
2010-01-06 15:18:23 -03:00
parent e7323517b0
commit 003f306cba
4 changed files with 55 additions and 31 deletions

View File

@@ -3264,9 +3264,7 @@ Expression *StructLiteralExp::semantic(Scope *sc)
}
}
else
{ e = v->type->defaultInit();
e->loc = loc;
}
e = v->type->defaultInitLiteral(loc);
offset = v->offset + v->type->size();
}
elements->push(e);