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
ab5a9360
Commit
ab5a9360
authored
Jul 28, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorder test module to restore the "invalid - valid" order.
parent
b9cecd60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
tests/errors/fused_types.pyx
tests/errors/fused_types.pyx
+14
-13
No files found.
tests/errors/fused_types.pyx
View file @
ab5a9360
...
...
@@ -49,6 +49,18 @@ def outer(cython.floating f):
def
inner
():
cdef
cython
.
floating
g
# Mixing const and non-const type makes fused type ambiguous
cdef
fused
mix_const_t
:
int
const
int
cdef
cdef
_func_with_mix_const_type
(
mix_const_t
val
):
print
(
val
)
cdef
_func_with_mix_const_type
(
1
)
# This is all valid
dtype5
=
fused_type
(
int
,
long
,
float
)
dtype6
=
cython
.
fused_type
(
int
,
long
)
...
...
@@ -65,17 +77,6 @@ ctypedef fused fused2:
func
(
x
,
y
)
cdef
fused
mix_const_t
:
int
const
int
cdef
cdef
_func_with_mix_const_type
(
mix_const_t
val
):
print
(
val
)
# Mixing const and non-const type makes fused type ambiguous
cdef
_func_with_mix_const_type
(
1
)
_ERRORS
=
u"""
11:15: fused_type does not take keyword arguments
16:33: Type specified multiple times
...
...
@@ -89,6 +90,6 @@ _ERRORS = u"""
40:0: Fused lambdas not allowed
43:5: Fused types not allowed here
46:9: Fused types not allowed here
76
:0: Invalid use of fused types, type cannot be specialized
76
:29: ambiguous overloaded method
61
:0: Invalid use of fused types, type cannot be specialized
61
:29: ambiguous overloaded method
"""
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