summaryrefslogtreecommitdiff
path: root/tests/compile/fused_redeclare_T3111.pyx
blob: bc3d54a998d424a405ee9d28e24fd5fb0de838d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# ticket: 3111
# mode: compile
# tag: warnings

ctypedef unsigned char npy_uint8
ctypedef unsigned short npy_uint16


ctypedef fused dtype_t:
    npy_uint8

ctypedef fused dtype_t_out:
    npy_uint8
    npy_uint16


def foo(dtype_t[:] a, dtype_t_out[:, :] b):
    pass


# The primary thing we're trying to test here is the _absence_ of the warning
# "__pyxutil:16:4: '___pyx_npy_uint8' redeclared".  The remaining warnings are
# unrelated to this test.
_WARNINGS = """
# cpdef redeclaration bug, from TestCythonScope.pyx
25:10: 'cpdef_method' redeclared
36:10: 'cpdef_cname_method' redeclared

# from MemoryView.pyx
977:29: Ambiguous exception value, same as default return value: 0
977:29: Ambiguous exception value, same as default return value: 0
1018:46: Ambiguous exception value, same as default return value: 0
1018:46: Ambiguous exception value, same as default return value: 0
1108:29: Ambiguous exception value, same as default return value: 0
1108:29: Ambiguous exception value, same as default return value: 0
"""