[poincare] Add NullStatus for expressions

Change-Id: Ibaba72e3e3589ba259c7b22d402e2b27937f27c1
This commit is contained in:
Hugo Saint-Vignes
2020-10-23 12:04:35 +02:00
committed by Émilie Feral
parent b2945c3f8b
commit 4a3f749cc6
18 changed files with 62 additions and 48 deletions

View File

@@ -51,7 +51,7 @@ void MatrixListController::setExpression(Poincare::Expression e) {
m_layouts[index++] = getLayoutFromExpression(determinant, context, preferences);
// 2. Matrix inverse if invertible matrix
// A squared matrix is invertible if and only if determinant is non null
if (!determinant.isUndefined() && !determinant.isNumberZero()) {
if (!determinant.isUndefined() && determinant.nullStatus(context) != ExpressionNode::NullStatus::Null) {
m_indexMessageMap[index] = messageIndex++;
m_layouts[index++] = getLayoutFromExpression(MatrixInverse::Builder(m_expression.clone()), context, preferences);
}