diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2014-10-07 21:58:01 -0700 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2014-10-07 21:58:01 -0700 |
commit | 6b21b89a4f08065cad97ed2a2d605c63ce3e866d (patch) | |
tree | ff354cdd515c62a5ceab653ac0ebca3e91a2c9a4 | |
parent | 0fbb48989a5d831101bced4e73f9a86137f8f058 (diff) | |
download | cython-6b21b89a4f08065cad97ed2a2d605c63ce3e866d.tar.gz |
Fix C++ type inference.
-rw-r--r-- | Cython/Compiler/TypeInference.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Cython/Compiler/TypeInference.py b/Cython/Compiler/TypeInference.py index 672869e0c..be608a7dd 100644 --- a/Cython/Compiler/TypeInference.py +++ b/Cython/Compiler/TypeInference.py @@ -494,7 +494,7 @@ def find_spanning_type(type1, type2): return PyrexTypes.c_double_type return result_type -def simply_type(result_type): +def simply_type(result_type, pos): if result_type.is_reference: result_type = result_type.ref_base_type if result_type.is_const: @@ -506,10 +506,10 @@ def simply_type(result_type): return result_type def aggressive_spanning_type(types, might_overflow, pos): - return simply_type(reduce(find_spanning_type, types)) + return simply_type(reduce(find_spanning_type, types), pos) def safe_spanning_type(types, might_overflow, pos): - result_type = simply_type(reduce(find_spanning_type, types)) + result_type = simply_type(reduce(find_spanning_type, types), pos) if result_type.is_pyobject: # In theory, any specific Python type is always safe to # infer. However, inferring str can cause some existing code |