mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Added workaround for DMD accepts-invalid regression 9268.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user