summaryrefslogtreecommitdiff
path: root/tests/compile/fused_redeclare_T3111.pyx
blob: c7064e7c05e4e532745cb25254a916db0be71dab (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
# 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 = """
20:10: 'cpdef_method' redeclared
31:10: 'cpdef_cname_method' redeclared
448:72: Argument evaluation order in C function call is undefined and may not be as expected
448:72: Argument evaluation order in C function call is undefined and may not be as expected
751:34: Argument evaluation order in C function call is undefined and may not be as expected
751:34: Argument evaluation order in C function call is undefined and may not be as expected
"""