mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Fix __annotation__ (#5849)
This commit is contained in:
@@ -491,6 +491,10 @@ impl Compiler<'_> {
|
||||
) -> CompileResult<()> {
|
||||
self.symbol_table_stack.push(symbol_table);
|
||||
|
||||
if Self::find_ann(body) {
|
||||
emit!(self, Instruction::SetupAnnotation);
|
||||
}
|
||||
|
||||
if let Some((last, body)) = body.split_last() {
|
||||
for statement in body {
|
||||
if let Stmt::Expr(StmtExpr { value, .. }) = &statement {
|
||||
|
||||
Reference in New Issue
Block a user