First merge of 2.064 beta.

This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
This commit is contained in:
David Nadlinger
2013-10-19 23:21:53 +02:00
committed by Kai Nacke
parent c400d180d2
commit cb341586e3
130 changed files with 13566 additions and 9190 deletions

View File

@@ -55,9 +55,16 @@ void StaticAssert::semantic2(Scope *sc)
ScopeDsymbol *sd = new ScopeDsymbol();
sc = sc->push(sd);
sc->flags |= SCOPEstaticassert;
Expression *e = exp->ctfeSemantic(sc);
sc = sc->startCTFE();
Expression *e = exp->semantic(sc);
e = resolveProperties(sc, e);
sc = sc->endCTFE();
sc = sc->pop();
// Simplify expression, to make error messages nicer if CTFE fails
e = e->optimize(0);
if (!e->type->checkBoolean())
{
if (e->type->toBasetype() != Type::terror)
@@ -73,11 +80,14 @@ void StaticAssert::semantic2(Scope *sc)
else if (e->isBool(FALSE))
{
if (msg)
{ HdrGenState hgs;
{
HdrGenState hgs;
OutBuffer buf;
msg = msg->ctfeSemantic(sc);
sc = sc->startCTFE();
msg = msg->semantic(sc);
msg = resolveProperties(sc, msg);
sc = sc->endCTFE();
msg = msg->ctfeInterpret();
hgs.console = 1;
StringExp * s = msg->toString();
@@ -101,11 +111,11 @@ void StaticAssert::semantic2(Scope *sc)
}
}
int StaticAssert::oneMember(Dsymbol **ps, Identifier *ident)
bool StaticAssert::oneMember(Dsymbol **ps, Identifier *ident)
{
//printf("StaticAssert::oneMember())\n");
*ps = NULL;
return TRUE;
return true;
}
void StaticAssert::inlineScan()