mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-06 15:03:13 +01:00
First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb. Doesn't build Phobos yet.
This commit is contained in:
committed by
Kai Nacke
parent
c400d180d2
commit
cb341586e3
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user