From ec007cb43faf5f33d06efbc28152c7fdcb2edb9c Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Sat, 4 Jan 2020 20:57:21 -0500 Subject: Fix SystemError when nested function has annotation on positional-only argument (GH-17826) --- Python/symtable.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python') 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) -- cgit v1.2.1