From e39ad9d9234504abddbce274bbb760a352ea86a4 Mon Sep 17 00:00:00 2001 From: Ruben Dashyan Date: Thu, 6 Feb 2020 11:10:37 +0100 Subject: [PATCH] [poincare/expression_node] Fix ExpresssionNode::Type ordering A Multiplication whose children are all real or ComplexCartesian are multiplied to form a single ComplexCartesian. That step of shallowReduce assumed that the last child is a ComplexCartesian. Since a Unit is now considered as real, the previous assumption can be maintained be reordering the ExpresssionNode::Type. --- poincare/include/poincare/expression_node.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poincare/include/poincare/expression_node.h b/poincare/include/poincare/expression_node.h index 391de016b..4041add6c 100644 --- a/poincare/include/poincare/expression_node.h +++ b/poincare/include/poincare/expression_node.h @@ -95,6 +95,7 @@ public: Subtraction, Sum, + Unit, ComplexCartesian, ConfidenceInterval, @@ -104,7 +105,6 @@ public: MatrixTranspose, PredictionInterval, Matrix, - Unit, EmptyExpression };