Work around invalid special ref var initializations in 2.063.

This commit is contained in:
David Nadlinger
2013-06-11 21:46:59 +02:00
parent fd3c696d94
commit a9e620d428

View File

@@ -419,7 +419,12 @@ DValue* AssignExp::toElem(IRState* p)
DVarValue* lhs = e1->toElem(p)->isVar();
assert(lhs);
DValue* rhs = e2->toElem(p);
DtoStore(rhs->getLVal(), lhs->getRefStorage());
// We shouldn't really need makeLValue() here, but the 2.063
// frontend generates ref variables initialized from function
// calls.
DtoStore(makeLValue(loc, rhs), lhs->getRefStorage());
return rhs;
}
}