Fix DMD Issue 11238 - Codegen error when this is a ref parameter to the method

This commit is contained in:
Alexey Prokhin
2013-12-08 14:56:40 +04:00
parent 89573a731a
commit ffe26e4ccc

View File

@@ -520,6 +520,7 @@ DValue* AssignExp::toElem(IRState* p)
if (se->lwr == NULL && ta->ty == Tsarray &&
e2->op == TOKarrayliteral &&
op == TOKconstruct && // DMD Bugzilla 11238: avoid aliasing issue
t2->nextOf()->mutableOf()->implicitConvTo(ta->nextOf()))
{
ArrayLiteralExp * const ale = static_cast<ArrayLiteralExp *>(e2);