Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
nexedi
cython
Commits
be2d17ba
Commit
be2d17ba
authored
4 years ago
by
Xavier Thompson
Browse files
Options
Download
Email Patches
Plain Diff
Fix inheritance inspection for qualified cypclasses
parent
6f1f493d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+15
-0
No files found.
Cython/Compiler/PyrexTypes.py
View file @
be2d17ba
...
...
@@ -4650,8 +4650,17 @@ class CypClassType(CppClassType):
def
is_subclass
(
self
,
other_type
):
if
other_type
.
is_const_cyp_class
:
other_type
=
other_type
.
const_base_type
elif
other_type
.
is_qualified_cyp_class
:
other_type
=
other_type
.
qual_base_type
return
super
(
CypClassType
,
self
).
is_subclass
(
other_type
)
def
subclass_dist
(
self
,
super_type
):
if
super_type
.
is_const_cyp_class
:
super_type
=
super_type
.
const_base_type
elif
super_type
.
is_qualified_cyp_class
:
super_type
=
super_type
.
qual_base_type
return
super
(
CypClassType
,
self
).
subclass_dist
(
super_type
)
def
get_constructor
(
self
,
pos
):
# This is (currently) only called by new statements.
# In cypclass, it means direct memory allocation:
...
...
@@ -4911,6 +4920,12 @@ class QualifiedCypclassType(BaseType):
return
self
.
qual_base_type
.
same_as_resolved_type
(
other_type
.
qual_base_type
)
return
0
def
is_subclass
(
self
,
other_type
):
return
self
.
qual_base_type
.
is_subclass
(
other_type
)
def
subclass_dist
(
self
,
super_type
):
return
self
.
qual_base_type
.
subclass_dist
(
super_type
)
def
__getattr__
(
self
,
name
):
return
getattr
(
self
.
qual_base_type
,
name
)
...
...
This diff is collapsed.
Click to expand it.
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