Commit cad63a53 authored by Markus Holzer's avatar Markus Holzer
Browse files

Fix conditional simplification

parent 1acd3925
......@@ -773,7 +773,7 @@ def simplify_conditionals(node: ast.Node, loop_counter_simplification: bool = Fa
"""
for conditional in node.atoms(ast.Conditional):
# TODO simplify conditional before the type system! Casts make it very hard here
conditional.condition_expr = sp.simplify(conditional.condition_expr)
# conditional.condition_expr = sp.simplify(conditional.condition_expr)
if conditional.condition_expr == sp.true:
conditional.parent.replace(conditional, [conditional.true_block])
elif conditional.condition_expr == sp.false:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment