mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-104686: Fix tracing for decorated classes (#104708)
This commit is contained in:
parent
64d1b44a54
commit
cd9748409a
2 changed files with 50 additions and 0 deletions
|
@ -2486,6 +2486,10 @@ compiler_class_body(struct compiler *c, stmt_ty s, int firstlineno)
|
|||
}
|
||||
|
||||
/* 2. load the 'build_class' function */
|
||||
|
||||
// these instructions should be attributed to the class line,
|
||||
// not a decorator line
|
||||
loc = LOC(s);
|
||||
ADDOP(c, loc, PUSH_NULL);
|
||||
ADDOP(c, loc, LOAD_BUILD_CLASS);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue