diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-07-28 11:11:44 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-07-29 07:35:56 +0200 |
commit | ab5a9360cf8871affd2e84eb25ab950452c6911f (patch) | |
tree | a29f034dc9fc6fa43df9a119ad4ea3beb02d63f3 | |
parent | b9cecd602878334173aa9f6ed635d48739bfa2b1 (diff) | |
download | cython-ab5a9360cf8871affd2e84eb25ab950452c6911f.tar.gz |
Reorder test module to restore the "invalid - valid" order.
-rw-r--r-- | tests/errors/fused_types.pyx | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/errors/fused_types.pyx b/tests/errors/fused_types.pyx index 6d9dd6879..b812b2977 100644 --- a/tests/errors/fused_types.pyx +++ b/tests/errors/fused_types.pyx @@ -49,6 +49,18 @@ def outer(cython.floating f): def inner(): cdef cython.floating g + +# Mixing const and non-const type makes fused type ambiguous +cdef fused mix_const_t: + int + const int + +cdef cdef_func_with_mix_const_type(mix_const_t val): + print(val) + +cdef_func_with_mix_const_type(1) + + # This is all valid dtype5 = fused_type(int, long, float) dtype6 = cython.fused_type(int, long) @@ -65,17 +77,6 @@ ctypedef fused fused2: func(x, y) -cdef fused mix_const_t: - int - const int - -cdef cdef_func_with_mix_const_type(mix_const_t val): - print(val) - -# Mixing const and non-const type makes fused type ambiguous -cdef_func_with_mix_const_type(1) - - _ERRORS = u""" 11:15: fused_type does not take keyword arguments 16:33: Type specified multiple times @@ -89,6 +90,6 @@ _ERRORS = u""" 40:0: Fused lambdas not allowed 43:5: Fused types not allowed here 46:9: Fused types not allowed here -76:0: Invalid use of fused types, type cannot be specialized -76:29: ambiguous overloaded method +61:0: Invalid use of fused types, type cannot be specialized +61:29: ambiguous overloaded method """ |