mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-09 08:54:09 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user