forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 2 additions and 2 deletions

View File

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