[poincare] Replaced an escape case with an assert only

Change-Id: I5ea501beeb42577a25dd752f8b9492210abd38fc
This commit is contained in:
Hugo Saint-Vignes
2020-11-16 17:07:33 +01:00
committed by EmilieNumworks
parent 73b5b0775a
commit 04b2683af2

View File

@@ -73,11 +73,7 @@ Expression SymbolAbstract::Expand(const SymbolAbstract & symbol, Context * conte
{
return clone ? symbol.clone() : *const_cast<SymbolAbstract *>(&symbol);
}
if (context == nullptr) {
// A context is required
assert(false);
return Undefined::Builder();
}
assert(context);
Expression e = context->expressionForSymbolAbstract(symbol, clone);
/* Replace all the symbols iteratively. This prevents a memory failure when
* symbols are defined circularly. */