forked from M-Labs/artiq
compiler/ir_values: fix right operations
This commit is contained in:
parent
a861226409
commit
841e7cce35
|
@ -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__))
|
||||||
|
|
Loading…
Reference in New Issue