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
Gwenaël Samain
cython
Commits
7a57ab27
Commit
7a57ab27
authored
Jul 28, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compiler crash due to uninitialised attribute
parent
26462a2a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
tests/errors/cpp_comparison.pyx
tests/errors/cpp_comparison.pyx
+14
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
7a57ab27
...
...
@@ -11330,6 +11330,7 @@ class PrimaryCmpNode(ExprNode, CmpNode):
def
analyse_cpp_comparison
(
self
,
env
):
type1
=
self
.
operand1
.
type
type2
=
self
.
operand2
.
type
self
.
is_pycmp
=
False
entry
=
env
.
lookup_operator
(
self
.
operator
,
[
self
.
operand1
,
self
.
operand2
])
if
entry
is
None
:
error
(
self
.
pos
,
"Invalid types for '%s' (%s, %s)"
%
...
...
@@ -11345,7 +11346,6 @@ class PrimaryCmpNode(ExprNode, CmpNode):
else
:
self
.
operand1
=
self
.
operand1
.
coerce_to
(
func_type
.
args
[
0
].
type
,
env
)
self
.
operand2
=
self
.
operand2
.
coerce_to
(
func_type
.
args
[
1
].
type
,
env
)
self
.
is_pycmp
=
False
self
.
type
=
func_type
.
return_type
def
analyse_memoryviewslice_comparison
(
self
,
env
):
...
...
tests/errors/cpp_comparison.pyx
0 → 100644
View file @
7a57ab27
# mode: error
# tag: cpp
from
libcpp.vector
cimport
vector
def
vector_is_none
(
vector
[
int
]
iv
):
# TODO: this isn't strictly wrong, so it might be allowed as a 'feature' at some point
if
iv
is
None
:
pass
_ERRORS
=
"""
8:10: Invalid types for 'is' (vector[int], Python object)
"""
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