diff options
Diffstat (limited to 'libjulia/optimiser/ExpressionSimplifier.cpp')
-rw-r--r-- | libjulia/optimiser/ExpressionSimplifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libjulia/optimiser/ExpressionSimplifier.cpp b/libjulia/optimiser/ExpressionSimplifier.cpp index bdcf3168..3d471cb3 100644 --- a/libjulia/optimiser/ExpressionSimplifier.cpp +++ b/libjulia/optimiser/ExpressionSimplifier.cpp @@ -43,8 +43,8 @@ void ExpressionSimplifier::visit(Expression& _expression) // Do not apply the rule if it removes non-constant parts of the expression. // TODO: The check could actually be less strict than "movable". // We only require "Does not cause side-effects". - if (std::get<2>(*match) && !MovableChecker(_expression).movable()) + if (match->removesNonConstants && !MovableChecker(_expression).movable()) return; - _expression = std::get<1>(*match)().toExpression(locationOf(_expression)); + _expression = match->action().toExpression(locationOf(_expression)); } } |