From 91fc9cf43cc2e3a2f236ef9944cf1f4bed701545 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 26 Oct 2019 17:30:14 +0300 Subject: [3.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16930) (cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813) --- Python/ast.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Python') diff --git a/Python/ast.c b/Python/ast.c index ce61375ea9..5a60d6994d 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -1531,8 +1531,9 @@ ast_for_decorator(struct compiling *c, const node *n) name_expr = NULL; } else if (NCH(n) == 5) { /* Call with no arguments */ - d = Call(name_expr, NULL, NULL, LINENO(n), - n->n_col_offset, c->c_arena); + d = Call(name_expr, NULL, NULL, + name_expr->lineno, name_expr->col_offset, + c->c_arena); if (!d) return NULL; name_expr = NULL; -- cgit v1.2.1