mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
arrays: Fix assigning T[n] to T[n][m].
This commit is contained in:
parent
f1530b2a41
commit
d2f3717c4d
1 changed files with 2 additions and 1 deletions
|
@ -259,7 +259,8 @@ void DtoArrayAssign(Loc& loc, DValue* lhs, DValue* rhs, int op, bool canSkipPost
|
||||||
LLValue* lhsPtr = DtoBitCast(DtoArrayPtr(lhs), getVoidPtrType());
|
LLValue* lhsPtr = DtoBitCast(DtoArrayPtr(lhs), getVoidPtrType());
|
||||||
LLValue* lhsLength = DtoArrayLen(lhs);
|
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[] = T[] T[] = T[n]
|
||||||
// T[n] = T[n] T[n] = T[]
|
// T[n] = T[n] T[n] = T[]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue