summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-06-21 09:55:15 (GMT)
committerGitHub <noreply@github.com>2021-06-21 09:55:15 (GMT)
commit82e5c28af7049c4f5343c808f172cbe2e145f49b (patch)
tree3f02d036472f7ee0ada4a283ba0748cd10c720d8 /Python/compile.c
parent5d2b3a0d688cf8a33db3d266c9e7049c13766a4c (diff)
downloadcpython-82e5c28af7049c4f5343c808f172cbe2e145f49b.zip
cpython-82e5c28af7049c4f5343c808f172cbe2e145f49b.tar.gz
cpython-82e5c28af7049c4f5343c808f172cbe2e145f49b.tar.bz2
bpo-44297: Fix missing line number in generator expressions (GH-26801)
* Make sure that line number is set when entering comprehension scope in compiler.
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 60777b0..0a18148 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -4900,6 +4900,7 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type,
{
goto error;
}
+ SET_LOC(c, e);
is_async_generator = c->u->u_ste->ste_coroutine;