mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Allow decorators and return annotations to be used together (fixes SF#1697248)
This commit is contained in:
parent
4138bfec0a
commit
71011e2c2b
2 changed files with 7 additions and 2 deletions
|
@ -983,7 +983,7 @@ ast_for_funcdef(struct compiling *c, const node *n)
|
|||
|
||||
REQ(n, funcdef);
|
||||
|
||||
if (NCH(n) == 6) { /* decorators are present */
|
||||
if (NCH(n) == 6 || NCH(n) == 8) { /* decorators are present */
|
||||
decorator_seq = ast_for_decorators(c, CHILD(n, 0));
|
||||
if (!decorator_seq)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue