mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 16:43:13 +01:00
Merged DMD commit 2b51411e9e8b7ca3e62747ffb6f96c94089cebcc:
4389 ICE(constfold.c) or wrong code: string~=dchar in CTFE Was failing on D1 because dchar, wchar implicitly convert to char, even if they don't fit. So we need to check for array~char BEFORE we check for implicit conversion.
This commit is contained in:
@@ -8609,14 +8609,6 @@ Expression *CatAssignExp::semantic(Scope *sc)
|
||||
e2 = e2->castTo(sc, e1->type);
|
||||
type = e1->type;
|
||||
e = this;
|
||||
}
|
||||
else if ((tb1->ty == Tarray) &&
|
||||
e2->implicitConvTo(tb1next)
|
||||
)
|
||||
{ // Append element
|
||||
e2 = e2->castTo(sc, tb1next);
|
||||
type = e1->type;
|
||||
e = this;
|
||||
// Reenable when _d_arrayappendwd and cd are in the runtime.
|
||||
/* }
|
||||
|
||||
@@ -8633,6 +8625,14 @@ Expression *CatAssignExp::semantic(Scope *sc)
|
||||
* to be a surrogate pair, nothing good can result.
|
||||
*/
|
||||
}
|
||||
else if ((tb1->ty == Tarray) &&
|
||||
e2->implicitConvTo(tb1next)
|
||||
)
|
||||
{ // Append element
|
||||
e2 = e2->castTo(sc, tb1next);
|
||||
type = e1->type;
|
||||
e = this;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tb1 != Type::terror && tb2 != Type::terror)
|
||||
|
||||
Reference in New Issue
Block a user