Commit 09de00cf authored by Markus Holzer's avatar Markus Holzer
Browse files

Merge branch 'doublewrite' into 'master'

add_types: only re-enable double-write check if it was previously enabled

See merge request pycodegen/pystencils!156
parents 4e87a215 d4a8419b
......@@ -954,6 +954,7 @@ def add_types(eqs, type_for_symbol, check_independence_condition):
# Disable double write check inside conditionals
# would be triggered by e.g. in-kernel boundaries
old_double_write = check.check_double_write_condition
check.check_double_write_condition = False
false_block = None if obj.false_block is None else visit(
......@@ -961,7 +962,7 @@ def add_types(eqs, type_for_symbol, check_independence_condition):
obj.condition_expr, type_constants=False),
check.check_double_write_condition = True
check.check_double_write_condition = old_double_write
return result
elif isinstance(obj, ast.Block):
Supports Markdown
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