diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-15 15:22:55 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-15 15:22:55 +0200 |
commit | 3b1b45de7bc432e080e02ef39a63f8c239d65879 (patch) | |
tree | 3cd782f9de574f98d8b7192eb3d279a60319704e /Cython/Compiler | |
parent | 7a974e4e8b2d5e312a8d3c9c4bf1ff8da7f59c8a (diff) | |
download | cython-3b1b45de7bc432e080e02ef39a63f8c239d65879.tar.gz |
Allow decorators on nested async-def functions.
Closes https://github.com/cython/cython/issues/1462
Diffstat (limited to 'Cython/Compiler')
-rw-r--r-- | Cython/Compiler/Parsing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 56884f0a2..fd19d6c8e 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -2237,7 +2237,7 @@ def p_statement(s, ctx, first_statement = 0): s.error('decorator not allowed here') s.level = ctx.level decorators = p_decorators(s) - if not ctx.allow_struct_enum_decorator and s.sy not in ('def', 'cdef', 'cpdef', 'class'): + if not ctx.allow_struct_enum_decorator and s.sy not in ('def', 'cdef', 'cpdef', 'class', 'async'): if s.sy == 'IDENT' and s.systring == 'async': pass # handled below else: |