Merge remote branch 'remotes/fransesc/compiler_directives'
[cython.git] / tests / errors / e_index.pyx
1 # mode: error
2
3 def f(obj1, obj2):
4         cdef int int1, int2, int3
5         cdef float flt1, *ptr1
6         cdef int array1[42]
7         int1 = array1[flt1] # error
8         int1 = array1[ptr1] # error
9         int1 = int2[int3] # error
10         obj1 = obj2[ptr1] # error
11 _ERRORS = u"""
12 7:14: Invalid index type 'float'
13 8:14: Invalid index type 'float *'
14 9:12: Attempting to index non-array type 'int'
15 10:17: Cannot convert 'float *' to Python object
16 """