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
Xavier Thompson
cython
Commits
30f17717
Commit
30f17717
authored
Dec 29, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit test for 'active' aliasing errors
parent
13ee9bf1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
tests/errors/cypclass_active_errors.pyx
tests/errors/cypclass_active_errors.pyx
+53
-0
No files found.
tests/errors/cypclass_active_errors.pyx
0 → 100644
View file @
30f17717
# mode: error
# tag: cpp, cpp11, pthread
# cython: experimental_cpp_class_def=True, language_level=2
cdef
cypclass
A
activable
:
void
f
(
self
,
A
other
):
pass
void
f_iso
(
self
,
iso
A
other
):
pass
void
f_locked
(
self
,
locked
A
other
):
pass
void
f_active
(
self
,
active
A
other
):
pass
def
test_aliasing
():
cdef
active
A
active_a
cdef
iso
A
iso_a
iso_a
=
active_a
cdef
locked
A
locked_a
locked_a
=
active_a
cdef
A
ref_a
ref_a
=
active_a
def
test_calling
():
a
=
activate
(
consume
A
())
a
.
f
(
NULL
,
A
())
a
.
f
(
NULL
,
consume
A
())
cdef
iso
A
iso_a
a
.
f_iso
(
NULL
,
consume
iso_a
)
cdef
locked
A
locked_a
a
.
f_locked
(
NULL
,
locked_a
)
cdef
active
A
active_a
a
.
f_active
(
NULL
,
active_a
)
_ERRORS
=
u'''
23:12: Cannot assign type 'active A' to 'iso A'
26:15: Cannot assign type 'active A' to 'locked A'
29:12: Cannot assign type 'active A' to 'A'
34:15: Cannot assign type 'A' to 'iso-> A'
'''
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