diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2019-10-26 14:30:14 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-26 14:30:14 (GMT) |
| commit | 91fc9cf43cc2e3a2f236ef9944cf1f4bed701545 (patch) | |
| tree | a545ea72e81d281f8b0ab5c3708d5acb7fa1bd10 /Python | |
| parent | 5207cc0ef0843c18cf3aab6fa918c9492ae4c1de (diff) | |
| download | cpython-91fc9cf43cc2e3a2f236ef9944cf1f4bed701545.zip cpython-91fc9cf43cc2e3a2f236ef9944cf1f4bed701545.tar.gz cpython-91fc9cf43cc2e3a2f236ef9944cf1f4bed701545.tar.bz2 | |
[3.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16930)
(cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813)
Diffstat (limited to 'Python')
| -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 ce61375..5a60d69 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; |
