diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2019-10-26 17:30:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-26 17:30:30 +0300 |
| commit | 493fef60a7600f83fe6916ed89d0fb0c0aab484d (patch) | |
| tree | 3c58ac5f7d86a672d7701cb0aca86c1f308ce54c /Python/ast.c | |
| parent | c80955cdee60c2688819a99a4c54252d77998263 (diff) | |
| download | cpython-git-493fef60a7600f83fe6916ed89d0fb0c0aab484d.tar.gz | |
[2.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16931)
(cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813)
Diffstat (limited to 'Python/ast.c')
| -rw-r--r-- | Python/ast.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c index 946032589f..10571a3ec2 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -852,8 +852,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, NULL, NULL, LINENO(n), - n->n_col_offset, c->c_arena); + d = Call(name_expr, NULL, NULL, NULL, NULL, + name_expr->lineno, name_expr->col_offset, + c->c_arena); if (!d) return NULL; name_expr = NULL; |
