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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
be2d17ba
Commit
be2d17ba
authored
Dec 10, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inheritance inspection for qualified cypclasses
parent
6f1f493d
Changes
1
Show 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):
...
@@ -4650,8 +4650,17 @@ class CypClassType(CppClassType):
def
is_subclass
(
self
,
other_type
):
def
is_subclass
(
self
,
other_type
):
if
other_type
.
is_const_cyp_class
:
if
other_type
.
is_const_cyp_class
:
other_type
=
other_type
.
const_base_type
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
)
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
):
def
get_constructor
(
self
,
pos
):
# This is (currently) only called by new statements.
# This is (currently) only called by new statements.
# In cypclass, it means direct memory allocation:
# In cypclass, it means direct memory allocation:
...
@@ -4911,6 +4920,12 @@ class QualifiedCypclassType(BaseType):
...
@@ -4911,6 +4920,12 @@ class QualifiedCypclassType(BaseType):
return
self
.
qual_base_type
.
same_as_resolved_type
(
other_type
.
qual_base_type
)
return
self
.
qual_base_type
.
same_as_resolved_type
(
other_type
.
qual_base_type
)
return
0
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
):
def
__getattr__
(
self
,
name
):
return
getattr
(
self
.
qual_base_type
,
name
)
return
getattr
(
self
.
qual_base_type
,
name
)
...
...
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