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
b6500f58
Commit
b6500f58
authored
Sep 23, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix another issue with automatic exception values.
parent
c31e18c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+2
-0
tests/run/cpp_template_subclasses.pyx
tests/run/cpp_template_subclasses.pyx
+27
-0
No files found.
Cython/Compiler/Symtab.py
View file @
b6500f58
...
...
@@ -2289,6 +2289,8 @@ class CppClassScope(Scope):
if
entry
.
type
.
same_as
(
type
):
# Fix with_gil vs nogil.
entry
.
type
=
entry
.
type
.
with_with_gil
(
type
.
with_gil
)
elif
type
.
is_cfunction
and
type
.
compatible_signature_with
(
entry
.
type
):
entry
.
type
=
type
else
:
error
(
pos
,
"Function signature does not match previous declaration"
)
else
:
...
...
tests/run/cpp_template_subclasses.pyx
View file @
b6500f58
...
...
@@ -138,3 +138,30 @@ cdef cppclass MyClass[O]:
cdef
cppclass
MySubclass
[
T
](
MyClass
[
T
]):
void
Invoke
(
Callback
[
T
]
*
callback
):
pass
cdef
cppclass
Getter
[
T
]:
T
get
(
bint
fire
)
except
*
:
if
fire
:
raise
RuntimeError
else
:
raise
NotImplementedError
cdef
cppclass
GetInt
(
Getter
[
int
]):
int
get
(
bint
fire
)
except
*
:
if
fire
:
raise
RuntimeError
else
:
return
389
def
test_subclass_exception_values
(
bint
fire
):
"""
>>> test_subclass_exception_values(False)
389
>>> test_subclass_exception_values(True)
Traceback (most recent call last):
...
RuntimeError
"""
cdef
GetInt
getter
return
getter
.
get
(
fire
)
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