blob: 5d5ece8540385b294ed1ebcebe7dc0aac5fba90b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# cython: warn.maybe_uninitialized=True
# mode: error
# tag: werror
# ticket: 739
def index_lhs(a):
cdef object idx
a[idx] = 1
def slice_lhs(a):
cdef object idx
a[:idx] = 1
_ERRORS = """
8:6: local variable 'idx' referenced before assignment
12:7: local variable 'idx' referenced before assignment
"""
|