Skip to content
Snippets Groups Projects
Commit 265c1933 authored by Jan Hönig's avatar Jan Hönig
Browse files

Fixing forgotten change to ast.Conditional in typing

parent 820ad582
No related merge requests found
Pipeline #37673 failed with stages
in 2 minutes and 58 seconds
......@@ -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(
obj.false_block)
result = ast.Conditional(self.process_expression(
obj.condition_expr, type_constants=False),
true_block=self.visit(obj.true_block),
false_block=false_block)
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
else:
......
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