mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-07 20:54:31 +08:00
Prevent incorrect syntax error with nonlocal of a parameter
Also includes a test for the error "name 'x' is assigned before nonlocal declaration" Fixes #175
This commit is contained in:
1 parent
93206f6eba
commit
e5d6663721
3 files changed
+37
No files matched your search
@@ -113,6 +113,29 @@ def x():
|
||||
nonlocal a
|
||||
|
||||
|
||||
def x(a):
|
||||
def y():
|
||||
nonlocal a
|
||||
|
||||
|
||||
def x(a, b):
|
||||
def y():
|
||||
nonlocal b
|
||||
nonlocal a
|
||||
|
||||
|
||||
def x(a):
|
||||
def y():
|
||||
def z():
|
||||
nonlocal a
|
||||
|
||||
|
||||
def x():
|
||||
def y(a):
|
||||
def z():
|
||||
nonlocal a
|
||||
|
||||
|
||||
a = *args, *args
|
||||
error[(*args, *args)] = 3
|
||||
*args, *args
|
||||
Reference in new issue
Block a user