Added workaround for DMD accepts-invalid regression 9268.

This commit is contained in:
David Nadlinger
2013-01-04 05:15:36 +01:00
parent b3f59134c1
commit 55fb4798a7

View File

@@ -405,6 +405,12 @@ void DtoAssign(Loc& loc, DValue* lhs, DValue* rhs, int op)
Type* t = lhs->getType()->toBasetype();
Type* t2 = rhs->getType()->toBasetype();
if (t->ty == Tvoid) {
// This is a frontend regression in DMD 2.061; should be removed once
// DMD Bugzilla issue 9268 is fixed.
error(loc, "Cannot assign values of type void.");
}
if (t->ty == Tstruct) {
DtoAggrCopy(lhs->getLVal(), rhs->getRVal());
}