Commit 265c1933 authored by Jan Hönig's avatar Jan Hönig
Browse files

Fixing forgotten change to ast.Conditional in typing

parent 820ad582
......@@ -54,16 +54,14 @@ class TypeAdder:
if isinstance(obj, (sp.Eq, ast.SympyAssignment, Assignment)):
return self.process_assignment(obj)
elif isinstance(obj, ast.Conditional):
condition, condition_type = self.figure_out_type(obj.condition_expr)
assert condition_type == BasicType('bool')
true_block = self.visit(obj.true_block)
false_block = None if obj.false_block is None else self.visit(
result = ast.Conditional(self.process_expression(
obj.condition_expr, type_constants=False),
return result
return ast.Conditional(condition, true_block=true_block, false_block=false_block)
elif isinstance(obj, ast.Block):
result = ast.Block([self.visit(e) for e in obj.args])
return result
return ast.Block([self.visit(e) for e in obj.args])
elif isinstance(obj, ast.Node) and not isinstance(obj, ast.LoopOverCoordinate):
return obj
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