mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-07 13:24:39 +08:00
Add no binding found for nonlocal issue
This commit is contained in:
@@ -175,10 +175,30 @@ FAILING_EXAMPLES = [
|
||||
'''),
|
||||
dedent('''
|
||||
def x():
|
||||
global a
|
||||
nonlocal a
|
||||
a = 4
|
||||
def y():
|
||||
global a
|
||||
nonlocal a
|
||||
'''),
|
||||
# Missing binding of nonlocal
|
||||
dedent('''
|
||||
def x():
|
||||
nonlocal a
|
||||
'''),
|
||||
dedent('''
|
||||
def x():
|
||||
def y():
|
||||
nonlocal a
|
||||
'''),
|
||||
dedent('''
|
||||
def x():
|
||||
a = 4
|
||||
def y():
|
||||
global a
|
||||
print(a)
|
||||
def z():
|
||||
nonlocal a
|
||||
'''),
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user