Fix constant folding optimization for positional only arguments (GH-17837)

This commit is contained in:
Anthony Sottile 2020-01-05 12:03:56 -05:00 committed by Pablo Galindo
parent 5ea7bb25e3
commit b121a4a45f
3 changed files with 15 additions and 0 deletions

View file

@ -617,6 +617,7 @@ astfold_comprehension(comprehension_ty node_, PyArena *ctx_, int optimize_)
static int
astfold_arguments(arguments_ty node_, PyArena *ctx_, int optimize_)
{
CALL_SEQ(astfold_arg, arg_ty, node_->posonlyargs);
CALL_SEQ(astfold_arg, arg_ty, node_->args);
CALL_OPT(astfold_arg, arg_ty, node_->vararg);
CALL_SEQ(astfold_arg, arg_ty, node_->kwonlyargs);