summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ParseTreeTransforms.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2019-03-04 10:39:20 +0100
committerStefan Behnel <stefan_ml@behnel.de>2019-03-04 10:39:20 +0100
commit7941b93adee1b8f3be102cbbafac392a051fc904 (patch)
tree89d631d58d80772c2020f392e41a362f3c55c6fe /Cython/Compiler/ParseTreeTransforms.py
parent61505ce492a8060f3458954320a5533d22a87c03 (diff)
downloadcython-7941b93adee1b8f3be102cbbafac392a051fc904.tar.gz
Add missing return type annotation to generators and coroutines.
Closes GH-2884.
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r--Cython/Compiler/ParseTreeTransforms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
index f4c0f5c36..4ff717b1d 100644
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -2624,7 +2624,8 @@ class MarkClosureVisitor(CythonTransform):
pos=node.pos, name=node.name, args=node.args,
star_arg=node.star_arg, starstar_arg=node.starstar_arg,
doc=node.doc, decorators=node.decorators,
- gbody=gbody, lambda_name=node.lambda_name)
+ gbody=gbody, lambda_name=node.lambda_name,
+ return_type_annotation=node.return_type_annotation)
return coroutine
def visit_CFuncDefNode(self, node):