From 55fb4798a7b98e0d6a167a0fecdcc1c3aa521a72 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 4 Jan 2013 05:15:36 +0100 Subject: [PATCH] Added workaround for DMD accepts-invalid regression 9268. --- gen/llvmhelpers.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 6d0151f6..16caa7fa 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -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()); }