You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# cython: language_level=3
def list_comp_in_closure():
"""
>>> list_comp_in_closure()
[4, 8](0,)
"""
x = 'abc'
def f():
return x
result = [for x in range(5) if x % 2 == 0](x*2)
assert x == 'abc' # don't leak in Py3 code
assert f() == 'abc' # don't leak in Py3 code
return result
generates invalid C code: the loop variable is defined in the closure struct but has a different name inside of the function code.
generates invalid C code: the loop variable is defined in the closure struct but has a different name inside of the function code.
Migrated from http://trac.cython.org/ticket/598
The text was updated successfully, but these errors were encountered: