Fix SystemError when nested function has annotation on positional-only argument (GH-17826)

This commit is contained in:
Anthony Sottile 2020-01-04 20:57:21 -05:00 committed by Pablo Galindo
parent 7dc72b8d4f
commit ec007cb43f
3 changed files with 11 additions and 0 deletions

View file

@ -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)