Merge dmd-1.073.

This commit is contained in:
kai
2012-02-23 20:41:22 +01:00
parent 53f9964b95
commit a23b837ebd
38 changed files with 2262 additions and 1340 deletions

View File

@@ -54,10 +54,15 @@ void StaticAssert::semantic2(Scope *sc)
{
//printf("StaticAssert::semantic2() %s\n", toChars());
Expression *e = exp->semantic(sc);
if (e->op == TOKerror)
if (e->type == Type::terror)
return;
unsigned olderrs = global.errors;
e = e->optimize(WANTvalue | WANTinterpret);
if (e->isBool(FALSE))
if (global.errors != olderrs)
{
errorSupplemental(loc, "while evaluating: static assert(%s)", exp->toChars());
}
else if (e->isBool(FALSE))
{
if (msg)
{ HdrGenState hgs;