diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-01-05 02:14:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-05 02:14:58 (GMT) |
commit | 859525590c7aad210ae5f2557140a52033c498cd (patch) | |
tree | 6a61c52faf673b88e8fcb9537c47c19b7ab20af3 /Python | |
parent | 867d8333ce6a7f74191ad464acc609d4a04e4acb (diff) | |
download | cpython-859525590c7aad210ae5f2557140a52033c498cd.zip cpython-859525590c7aad210ae5f2557140a52033c498cd.tar.gz cpython-859525590c7aad210ae5f2557140a52033c498cd.tar.bz2 |
Fix SystemError when nested function has annotation on positional-only argument (GH-17826)
(cherry picked from commit ec007cb43faf5f33d06efbc28152c7fdcb2edb9c)
Co-authored-by: Anthony Sottile <asottile@umich.edu>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/symtable.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index b871358..30482d9 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -1717,6 +1717,8 @@ static int symtable_visit_annotations(struct symtable *st, stmt_ty s, arguments_ty a, expr_ty returns) { + if (a->posonlyargs && !symtable_visit_argannotations(st, a->posonlyargs)) + return 0; if (a->args && !symtable_visit_argannotations(st, a->args)) return 0; if (a->vararg && a->vararg->annotation) |