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
Boxiang Sun
cython
Commits
d1ff05f2
Commit
d1ff05f2
authored
Feb 18, 2011
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del test and assignment fix
parent
e46c93f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
12 deletions
+13
-12
Cython/Compiler/TypeInference.py
Cython/Compiler/TypeInference.py
+6
-0
tests/errors/e_del2.pyx
tests/errors/e_del2.pyx
+0
-12
tests/run/delete.pyx
tests/run/delete.pyx
+7
-0
No files found.
Cython/Compiler/TypeInference.py
View file @
d1ff05f2
...
@@ -121,6 +121,12 @@ class MarkAssignments(CythonTransform):
...
@@ -121,6 +121,12 @@ class MarkAssignments(CythonTransform):
self
.
visitchildren
(
node
)
self
.
visitchildren
(
node
)
return
node
return
node
def
visit_DelStatNode
(
self
,
node
):
for
arg
in
node
.
args
:
self
.
mark_assignment
(
arg
,
arg
)
self
.
visitchildren
(
node
)
return
node
class
MarkOverflowingArithmetic
(
CythonTransform
):
class
MarkOverflowingArithmetic
(
CythonTransform
):
# It may be possible to integrate this with the above for
# It may be possible to integrate this with the above for
...
...
tests/errors/e_del2.pyx
deleted
100644 → 0
View file @
e46c93f1
# Errors reported during code generation.
cdef
int
i
def
f
(
a
):
del
a
# error: deletion of local name not supported
del
i
# error: deletion of local name not supported
_ERRORS
=
u"""
6:52: Deletion of local or C global name not supported
7:52: Deletion of local or C global name not supported
"""
tests/run/delete.pyx
View file @
d1ff05f2
...
@@ -80,3 +80,10 @@ def del_temp_slice(a):
...
@@ -80,3 +80,10 @@ def del_temp_slice(a):
while
a
.
attr
:
while
a
.
attr
:
del
a
.
attr
[:]
del
a
.
attr
[:]
return
a
.
attr
return
a
.
attr
def
del_local
(
a
):
"""
>>> del_local(object())
"""
del
a
assert
a
is
None
# Until we have unbound locals...
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