mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-07 09:44:32 +08:00
Added a closure test that would have failed before the names_dict refactoring.
This commit is contained in:
1 parent
144c20579b
commit
108cab21f4
1 file changed
+16
@@ -89,6 +89,22 @@ def f(b, a): return a
|
||||
#? []
|
||||
f(b=3)
|
||||
|
||||
# -----------------
|
||||
# closure
|
||||
# -----------------
|
||||
|
||||
def x():
|
||||
a = 0
|
||||
|
||||
def x():
|
||||
return a
|
||||
|
||||
a = 3.0
|
||||
return x()
|
||||
|
||||
#? float()
|
||||
x()
|
||||
|
||||
# -----------------
|
||||
# class
|
||||
# -----------------
|
||||
|
||||
Reference in new issue
Block a user