diff options
author | Mark Shannon <mark@hotpy.org> | 2021-01-15 13:52:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 13:52:00 (GMT) |
commit | e56d54e447694c6ced2093d2273c3e3d60b36b6f (patch) | |
tree | ad30807810f6be60a8a51910a6beb80ecd5c3db5 /Python/compile.c | |
parent | 4c94d74152a511d977fe26a4f3a32b7352ba9024 (diff) | |
download | cpython-e56d54e447694c6ced2093d2273c3e3d60b36b6f.zip cpython-e56d54e447694c6ced2093d2273c3e3d60b36b6f.tar.gz cpython-e56d54e447694c6ced2093d2273c3e3d60b36b6f.tar.bz2 |
Mark instructions at end of class scope as artificial. (GH-24222)
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index d373d8a..6aa74cc 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2371,6 +2371,8 @@ compiler_class(struct compiler *c, stmt_ty s) compiler_exit_scope(c); return 0; } + /* The following code is artificial */ + c->u->u_lineno = -1; /* Return __classcell__ if it is referenced, otherwise return None */ if (c->u->u_ste->ste_needs_class_closure) { /* Store __classcell__ into class namespace & return it */ |