diff options
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 35a7848..79f3baa 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2502,6 +2502,11 @@ compiler_class_body(struct compiler *c, stmt_ty s, int firstlineno) compiler_exit_scope(c); return ERROR; } + ADDOP_LOAD_CONST_NEW(c, loc, PyLong_FromLong(c->u->u_metadata.u_firstlineno)); + if (compiler_nameop(c, loc, &_Py_ID(__firstlineno__), Store) < 0) { + compiler_exit_scope(c); + return ERROR; + } asdl_type_param_seq *type_params = s->v.ClassDef.type_params; if (asdl_seq_LEN(type_params) > 0) { if (!compiler_set_type_params_in_class(c, loc)) { |