Emit correct TypeInfo argument for _d_arrayassign.

Fixes part of DMD testcase 'sdtor'.
This commit is contained in:
David Nadlinger
2012-09-04 02:49:05 +02:00
parent 207033c427
commit 1cecab16cf

View File

@@ -208,7 +208,10 @@ void DtoArrayAssign(DValue *array, DValue *value, int op)
assert(value && array);
assert(op != TOKblit);
Type *t = value->type->toBasetype();
// Use array->type instead of value->type so as to not accidentally pick
// up a superfluous const layer (TypeInfo_Const doesn't pass on postblit()).
Type *t = array->type->toBasetype();
assert(t->nextOf());
Type *elemType = t->nextOf()->toBasetype();