diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-01-04 20:57:21 -0500 |
---|---|---|
committer | Pablo Galindo <Pablogsal@gmail.com> | 2020-01-05 01:57:21 +0000 |
commit | ec007cb43faf5f33d06efbc28152c7fdcb2edb9c (patch) | |
tree | 4a5ee08f0316fdfca2910d9a869cced9b8fd5b07 /Python/symtable.c | |
parent | 7dc72b8d4f2c9d1eed20f314fd6425eab66cbc89 (diff) | |
download | cpython-git-ec007cb43faf5f33d06efbc28152c7fdcb2edb9c.tar.gz |
Fix SystemError when nested function has annotation on positional-only argument (GH-17826)
Diffstat (limited to 'Python/symtable.c')
-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 b8713588b9..30482d99b3 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) |