2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-24 19:04:02 +08:00

compiler/ir_values: fix right operations

This commit is contained in:
Sebastien Bourdeauducq 2014-08-28 18:58:05 +08:00
parent a861226409
commit 841e7cce35

View File

@ -299,11 +299,11 @@ def _make_binary_operator(op_name):
result = opf(r, builder)
if result is NotImplemented:
try:
ropf = getattr(l, "or_"+op_name)
ropf = getattr(r, "or_"+op_name)
except AttributeError:
result = NotImplemented
else:
result = ropf(r, builder)
result = ropf(l, builder)
if result is NotImplemented:
raise TypeError("Unsupported operand types for {}: {} and {}".format(
op_name, type(l).__name__, type(r).__name__))