Commit 0e4ea163 authored by Pablo Galindo's avatar Pablo Galindo Committed by GitHub

bpo-37947: Adjust correctly the recursion level in symtable for named expressions (GH-15499)

parent 1c060099
Adjust correctly the recursion level in the symtable generation for named
expressions. Patch by Pablo Galindo.
......@@ -1508,6 +1508,7 @@ symtable_handle_namedexpr(struct symtable *st, expr_ty e)
}
VISIT(st, expr, e->v.NamedExpr.value);
VISIT(st, expr, e->v.NamedExpr.target);
VISIT_QUIT(st, 1);
}
static int
......@@ -1520,7 +1521,8 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
}
switch (e->kind) {
case NamedExpr_kind:
symtable_handle_namedexpr(st, e);
if(!symtable_handle_namedexpr(st, e))
VISIT_QUIT(st, 0);
break;
case BoolOp_kind:
VISIT_SEQ(st, expr, e->v.BoolOp.values);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment