Commit 20d385c2 authored by Stefan Behnel's avatar Stefan Behnel

fix and extend carray assignment error test

parent 610c112a
......@@ -14,21 +14,36 @@ ctypedef int[1] int_array
cdef int_array x, y
x = y # not an error anymore
x = y # not an error
cdef int_array *x_ptr = &x
x_ptr[0] = y # error
x_ptr[0] = y # not an error
cdef class A:
cdef int_array value
def __init__(self):
self.value = x # error
self.value = x # not an error
ctypedef int[2] int_array2
cdef int_array2 z
z = x # error
cdef enum:
SIZE = 2
ctypedef int[SIZE] int_array_dyn
cdef int_array_dyn d
d = z # error
_ERRORS = u"""
20:5: Assignment to non-lvalue of type 'int_array'
25:12: Assignment to non-lvalue of type 'int_array'
7:19: Cannot assign type 'char *' to 'int'
8:20: Cannot convert Python object to 'int *'
10:20: Cannot convert 'int *' to Python object
31:14: Cannot assign type 'int_array' to 'int_array2'
40:14: Cannot assign type 'int_array2' to 'int_array_dyn'
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment