diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2014-10-07 21:32:40 -0700 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2014-10-07 21:32:40 -0700 |
commit | 0fbb48989a5d831101bced4e73f9a86137f8f058 (patch) | |
tree | 7b5a0b79efed8d689c668f4b28fc20855d469f72 | |
parent | b3ee6b3cdbc9fdc03df70a6f72230dfdeefb91ca (diff) | |
download | cython-0fbb48989a5d831101bced4e73f9a86137f8f058.tar.gz |
More type inference tests.
-rw-r--r-- | tests/run/type_inference.pyx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx index ee1aeb926..43d2830e3 100644 --- a/tests/run/type_inference.pyx +++ b/tests/run/type_inference.pyx @@ -507,6 +507,18 @@ def ptr_types(): cdef int[1] b b_ref = b assert typeof(b_ref) == "int *", typeof(b_ref) + ptr = &a + ptr = b + assert typeof(ptr) == "int *", typeof(ptr) + +def const_types(const double x, double y, double& z): + """ + >>> const_types(1, 1, 1) + """ + a = x + a = y + a = z + assert typeof(a) == "double", typeof(a) @infer_types(None) def args_tuple_keywords(*args, **kwargs): |