summaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-07-24 12:37:09 -0700
committerGitHub <noreply@github.com>2020-07-24 12:37:09 -0700
commita6e048686fe6999c4231582b7d9e69a7dc679257 (patch)
tree24d31afd3d901bb0cc15a000226af520a8628a6c /py/compile.c
parenta5725941a038af87c36afe8bc6a5a5e983e597a5 (diff)
parente9b4e0bd35b6c3024a662580e547df62ab95acd1 (diff)
Merge pull request #3178 from WarriorOfWire/async_def_coroutine_sim
add coroutine behavior for generators
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/compile.c b/py/compile.c
index 470811005..9b0d29998 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -1890,7 +1890,7 @@ STATIC void compile_async_stmt(compiler_t *comp, mp_parse_node_struct_t *pns) {
// async def
compile_funcdef(comp, pns0);
scope_t *fscope = (scope_t*)pns0->nodes[4];
- fscope->scope_flags |= MP_SCOPE_FLAG_GENERATOR;
+ fscope->scope_flags |= MP_SCOPE_FLAG_GENERATOR | MP_SCOPE_FLAG_ASYNC;
} else if (MP_PARSE_NODE_STRUCT_KIND(pns0) == PN_for_stmt) {
// async for
compile_async_for_stmt(comp, pns0);