mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Merged DMD commit 59c07625e84aadd2f684ea77f925ae540d5c8906:
bugzilla 4926 ICE: PREC_zero assertion failure due to unset precedence
This commit is contained in:
@@ -5283,7 +5283,8 @@ Expression *AssertExp::semantic(Scope *sc)
|
||||
if (e1->isBool(FALSE))
|
||||
{
|
||||
FuncDeclaration *fd = sc->parent->isFuncDeclaration();
|
||||
fd->hasReturnExp |= 4;
|
||||
if (fd)
|
||||
fd->hasReturnExp |= 4;
|
||||
|
||||
if (!global.params.useAssert)
|
||||
{ Expression *e = new HaltExp(loc);
|
||||
@@ -9697,6 +9698,14 @@ RemoveExp::RemoveExp(Loc loc, Expression *e1, Expression *e2)
|
||||
type = Type::tvoid;
|
||||
}
|
||||
|
||||
void RemoveExp::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
|
||||
{
|
||||
expToCBuffer(buf, hgs, e1, PREC_primary);
|
||||
buf->writestring(".remove(");
|
||||
expToCBuffer(buf, hgs, e2, PREC_assign);
|
||||
buf->writestring(")");
|
||||
}
|
||||
|
||||
/************************************************************/
|
||||
|
||||
CmpExp::CmpExp(enum TOK op, Loc loc, Expression *e1, Expression *e2)
|
||||
|
||||
Reference in New Issue
Block a user