forked from M-Labs/artiq
transforms.inferencer: do not unnecessarily mutate typedtree.
This caused the hash to change after every iteration of inference, if the result of any coercion was an integer of indefinite width.
This commit is contained in:
parent
8c9f157563
commit
7e886ddc89
|
@ -293,7 +293,8 @@ class Inferencer(algorithm.Visitor):
|
|||
return coerced_node
|
||||
elif isinstance(coerced_node, asttyped.CoerceT):
|
||||
node = coerced_node
|
||||
node.type, node.other_value = typ, other_node
|
||||
node.type.unify(typ)
|
||||
node.other_value = other_node
|
||||
else:
|
||||
node = asttyped.CoerceT(type=typ, value=coerced_node, other_value=other_node,
|
||||
loc=coerced_node.loc)
|
||||
|
|
Loading…
Reference in New Issue