Commit 8f516cc5 authored by Stefan Behnel's avatar Stefan Behnel

additional closure tests

parent 13b408b8
...@@ -184,3 +184,31 @@ def more_inner_funcs(x): ...@@ -184,3 +184,31 @@ def more_inner_funcs(x):
# called with (2,4,8) # called with (2,4,8)
return f(a_f), g(b_g), h(b_h) return f(a_f), g(b_g), h(b_h)
return resolve return resolve
def deep_inner():
"""
>>> deep_inner()()
2
"""
cdef int x = 1
def f():
def g():
def h():
return x+1
return h
return g()
return f()
def deep_inner_sibling():
"""
>>> deep_inner_sibling()()
2
"""
cdef int x = 1
def f():
def g():
return x+1
def h():
return g()
return h
return f()
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