From 841e7cce35f22813978af8fa5c09cd0074256c19 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 28 Aug 2014 18:58:05 +0800 Subject: [PATCH] compiler/ir_values: fix right operations --- artiq/compiler/ir_values.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/compiler/ir_values.py b/artiq/compiler/ir_values.py index aa7737422..72b209a37 100644 --- a/artiq/compiler/ir_values.py +++ b/artiq/compiler/ir_values.py @@ -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__))