arrays: Fix assigning T[n] to T[n][m].

This commit is contained in:
David Nadlinger 2015-07-27 18:50:50 +02:00
parent f1530b2a41
commit d2f3717c4d

View file

@ -259,7 +259,8 @@ void DtoArrayAssign(Loc& loc, DValue* lhs, DValue* rhs, int op, bool canSkipPost
LLValue* lhsPtr = DtoBitCast(DtoArrayPtr(lhs), getVoidPtrType());
LLValue* lhsLength = DtoArrayLen(lhs);
if (t2->ty == Tarray || t2->ty == Tsarray)
// TODO: This should use AssignExp::ismemset.
if (!t2->implicitConvTo(t->nextOf()))
{
// T[] = T[] T[] = T[n]
// T[n] = T[n] T[n] = T[]