2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

Implement inferencing for AugAssign.

This commit is contained in:
whitequark 2015-06-02 08:53:11 +03:00
parent f979a76c7c
commit 76ce364fea

View File

@ -216,6 +216,12 @@ class Inferencer(algorithm.Transformer):
node.targets[0].loc, node.value.loc)
return node
def visit_AugAssign(self, node):
node = self.generic_visit(node)
self._unify(node.target.type, node.value.type,
node.target.loc, node.value.loc)
return node
class Printer(algorithm.Visitor):
def __init__(self, buf):
self.rewriter = source.Rewriter(buf)