mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861)
This commit is contained in:
parent
cb2cf06b0a
commit
26ae9f6d3d
3 changed files with 12 additions and 8 deletions
|
@ -1747,8 +1747,10 @@ 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, n->n_end_lineno, n->n_end_col_offset, c->c_arena);
|
||||
d = Call(name_expr, NULL, NULL,
|
||||
name_expr->lineno, name_expr->col_offset,
|
||||
CHILD(n, 3)->n_end_lineno, CHILD(n, 3)->n_end_col_offset,
|
||||
c->c_arena);
|
||||
if (!d)
|
||||
return NULL;
|
||||
name_expr = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue