diff options
-rw-r--r-- | inference.py | 1 | ||||
-rw-r--r-- | protocols.py | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/inference.py b/inference.py index ee5634bb..c849a801 100644 --- a/inference.py +++ b/inference.py @@ -357,6 +357,7 @@ BIN_OP_METHOD = {'+': '__add__', def _infer_binop(operator, operand1, operand2, context, failures=None): if operand1 is YES: yield operand1 + return try: for valnode in operand1.infer_binary_op(operator, operand2, context): yield valnode diff --git a/protocols.py b/protocols.py index 9f1834ec..f98731e4 100644 --- a/protocols.py +++ b/protocols.py @@ -81,6 +81,8 @@ def const_infer_binary_op(self, operator, other, context): except TypeError: # XXX log TypeError continue + elif other is YES: + yield other else: try: for val in other.infer_binary_op(operator, self, context): |