Commit f6be4d69 by Jared Roesch Committed by Tianqi Chen

Fix issue mutating if expressions (#2601)

parent d7390d16
......@@ -143,9 +143,9 @@ class ExprMutator(ExprFunctor):
def visit_if(self, ite):
return If(
self.visit(ite.guard),
self.visit(ite.true_b),
self.visit(ite.false_b))
self.visit(ite.cond),
self.visit(ite.true_branch),
self.visit(ite.false_branch))
def visit_tuple(self, tup):
return Tuple([self.visit(field) for field in tup.fields])
......
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