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
Gwenaël Samain
cython
Commits
d1ff05f2
Commit
d1ff05f2
authored
14 years ago
by
Robert Bradshaw
Browse files
Options
Download
Email Patches
Plain Diff
del test and assignment fix
parent
e46c93f1
Changes
3
Hide 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):
self
.
visitchildren
(
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
):
# It may be possible to integrate this with the above for
...
...
This diff is collapsed.
Click to expand it.
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
"""
This diff is collapsed.
Click to expand it.
tests/run/delete.pyx
View file @
d1ff05f2
...
...
@@ -80,3 +80,10 @@ def del_temp_slice(a):
while
a
.
attr
:
del
a
.
attr
[:]
return
a
.
attr
def
del_local
(
a
):
"""
>>> del_local(object())
"""
del
a
assert
a
is
None
# Until we have unbound locals...
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