[poincare] Store: implementation of deepReduceChildren should

recursively test that the children are not matrix (or enable the
interruption flag)
This commit is contained in:
Émilie Feral
2019-01-21 17:54:11 +01:00
committed by LeaNumworks
parent 21fcc84df0
commit 5abb05e7bc

View File

@@ -16,6 +16,10 @@ extern "C" {
namespace Poincare {
void StoreNode::deepReduceChildren(Context & context, Preferences::ComplexFormat complexFormat, Preferences::AngleUnit angleUnit, ExpressionNode::ReductionTarget target) {
// Interrupt simplification if the expression stored contains a matrix
if (Expression(childAtIndex(0)).recursivelyMatches([](const Expression e, Context & context, bool replaceSymbols) { return Expression::IsMatrix(e, context, replaceSymbols); }, context, true)) {
Expression::SetInterruption(true);
}
return;
}