Implement inferencing for AugAssign.

This commit is contained in:
whitequark 2015-06-02 08:53:11 +03:00
parent f979a76c7c
commit 76ce364fea
1 changed files with 6 additions and 0 deletions

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)