arg = self.args[i] = arg.analyse_target_expression(env, None)
if arg.type.is_pyobject or (arg.is_name and
arg.type.is_memoryviewslice):
- pass
+ if arg.is_name and arg.entry.is_cglobal:
+ error(arg.pos, "Deletion of global C variable")
elif arg.type.is_ptr and arg.type.base_type.is_cpp_class:
self.cpp_check(env)
elif arg.type.is_cpp_class:
del a
return inner()
+cdef object g
+del g
+
_ERRORS = u"""
10:9: Cannot assign to or delete this
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
+23:5: Deletion of global C variable
"""