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
28025b43
Commit
28025b43
authored
Dec 09, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve compilation errors for 'consume' and cypclass aliasing
parent
beb847ce
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+2
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
28025b43
...
...
@@ -11375,7 +11375,7 @@ class ConsumeNode(ExprNode):
self
.
operand
=
self
.
operand
.
analyse_types
(
env
)
operand_type
=
self
.
operand
.
type
if
not
operand_type
.
is_cyp_class
:
error
(
self
.
pos
,
"Can only consume cypclass
"
)
error
(
self
.
pos
,
"Can only consume cypclass
(not '%s')"
%
operand_type
)
self
.
type
=
PyrexTypes
.
error_type
return
self
if
operand_type
.
is_qualified_cyp_class
:
...
...
Cython/Compiler/PyrexTypes.py
View file @
28025b43
...
...
@@ -4894,6 +4894,8 @@ class QualifiedCypclassType(BaseType):
return
self
.
assignable_from_resolved_type
(
src_type
.
resolve
())
def
assignable_from_resolved_type
(
self
,
src_type
):
if
src_type
is
error_type
:
return
1
if
src_type
.
is_null_ptr
:
return
1
if
src_type
.
is_qualified_cyp_class
and
src_type
.
qualifier
in
self
.
assignable_to
[
self
.
qualifier
]:
...
...
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