Test closure extraction

This commit is contained in:
Dave Halter
2020-02-23 23:56:59 +01:00
parent 48e25c1b9b
commit 24a4c3ceba

View File

@@ -127,3 +127,17 @@ class Ya():
a = 3
#? 11 text {'new_name': 'f'}
c = f(a)
# -------------------------------------------------- in-closure
def x(z):
def y(x):
#? 15 text {'new_name': 'f'}
return -x * z
# ++++++++++++++++++++++++++++++++++++++++++++++++++
def f(x, z):
return -x * z
def x(z):
def y(x):
#? 15 text {'new_name': 'f'}
return f(x, z)