Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
20d385c2
Commit
20d385c2
authored
Oct 25, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix and extend carray assignment error test
parent
610c112a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
tests/errors/e_ass.pyx
tests/errors/e_ass.pyx
+20
-5
No files found.
tests/errors/e_ass.pyx
View file @
20d385c2
...
...
@@ -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'
"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment