Merge 2.058beta

This commit is contained in:
Alexey Prokhin
2012-02-12 14:42:37 +04:00
parent f2ed2e96b0
commit e74e55df89
64 changed files with 5261 additions and 2974 deletions

View File

@@ -58,10 +58,15 @@ void StaticAssert::semantic2(Scope *sc)
sc->flags |= SCOPEstaticassert;
Expression *e = exp->semantic(sc);
sc = sc->pop();
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;
@@ -86,7 +91,7 @@ void StaticAssert::semantic2(Scope *sc)
}
}
int StaticAssert::oneMember(Dsymbol **ps)
int StaticAssert::oneMember(Dsymbol **ps, Identifier *ident)
{
//printf("StaticAssert::oneMember())\n");
*ps = NULL;