pytholite: fix bug with constant assignment to register
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 19 Dec 2012 15:21:57 +0000 (16:21 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Wed, 19 Dec 2012 15:21:57 +0000 (16:21 +0100)
migen/pytholite/compiler.py

index 2d437bc17d4882d9ec486e80cd60e7d7b5643ece..1faf1e108e07beaad86f70b4055ed81caf0fc3a0 100644 (file)
@@ -70,7 +70,7 @@ class _Compiler:
                                return self.visit_assign_special(sa, node, statements)
                else:
                        value = self.ec.visit_expr(node.value)
-               if isinstance(value, Value):
+               if isinstance(value, (int, bool, Value)):
                        r = []
                        for target in node.targets:
                                if isinstance(target, ast.Attribute) and target.attr == "store":