Permalink
Browse files

Emit correct TypeInfo argument for _d_arrayassign.

Fixes part of DMD testcase 'sdtor'.
  • Loading branch information...
1 parent 207033c commit 1cecab16cf234ea0c529d121f856ed49f818bac4 @klickverbot klickverbot committed Sep 4, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 gen/arrays.cpp
View
@@ -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();

0 comments on commit 1cecab1

Please sign in to comment.