Commit 69890b58 authored by Vitja Makarov's avatar Vitja Makarov

Add testcase for closure variable deletion

parent e4793863
......@@ -12,9 +12,18 @@ def f(a):
del j # error: deletion of non-Python object
del x[i] # error: deletion of non-Python object
del s.m # error: deletion of non-Python object
def outer(a):
def inner():
print a
del a
return inner()
_ERRORS = u"""
10:9: Cannot assign to or delete this
11:48: Deletion of non-Python, non-C++ object
13:9: Deletion of non-Python, non-C++ object
14:9: Deletion of non-Python, non-C++ object
19:9: can not delete variable 'a' referenced in nested scope
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment