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:
parent
f979a76c7c
commit
76ce364fea
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user