mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-09 08:54:09 +02:00
Update to DMD@a9eedd1.
Also include latest phobos changes.
This commit is contained in:
@@ -11995,10 +11995,26 @@ Ltupleassign:
|
||||
warning("explicit element-wise assignment %s = (%s)[] is better than %s = %s",
|
||||
e1str, e2str, e1str, e2str);
|
||||
}
|
||||
if (op == TOKconstruct)
|
||||
|
||||
Type *t2n = t2->nextOf();
|
||||
Type *t1n = t1->nextOf();
|
||||
int offset;
|
||||
if (t2n->immutableOf()->equals(t1n->immutableOf()) ||
|
||||
t1n->isBaseOf(t2n, &offset) && offset == 0)
|
||||
{
|
||||
/* Allow copy of distinct qualifier elements.
|
||||
* eg.
|
||||
* char[] dst; const(char)[] src;
|
||||
* dst[] = src;
|
||||
*
|
||||
* class C {} class D : C {}
|
||||
* C[2] ca; D[] da;
|
||||
* ca[] = da;
|
||||
*/
|
||||
e2 = e2->castTo(sc, e1->type->constOf());
|
||||
}
|
||||
else
|
||||
e2 = e2->implicitCastTo(sc, e1->type->constOf());
|
||||
e2 = e2->implicitCastTo(sc, e1->type);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user