mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
arrays: Fix static array of non-pod structs
This commit is contained in:
parent
5bdf482b8a
commit
b5e9e556d5
1 changed files with 4 additions and 1 deletions
|
@ -251,8 +251,11 @@ void DtoArrayAssign(Loc& loc, DValue* lhs, DValue* rhs, int op, bool canSkipPost
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TOKblit is generated by the frontend for (default) initialization of
|
||||||
|
// static arrays of structs with a single element.
|
||||||
|
const bool isConstructing = (op == TOKconstruct || op == TOKblit);
|
||||||
|
|
||||||
Type* const elemType = t->nextOf()->toBasetype();
|
Type* const elemType = t->nextOf()->toBasetype();
|
||||||
const bool isConstructing = (op == TOKconstruct); // TODO: TOKblit?
|
|
||||||
const bool needsDestruction = (!isConstructing && elemType->needsDestruction());
|
const bool needsDestruction = (!isConstructing && elemType->needsDestruction());
|
||||||
const bool needsPostblit = (!canSkipPostblit && arrayNeedsPostblit(t));
|
const bool needsPostblit = (!canSkipPostblit && arrayNeedsPostblit(t));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue