Fix __annotation__ (#5849)

This commit is contained in:
Jeong, YunWon
2025-06-27 20:36:19 +09:00
committed by GitHub
parent 5504f6d9e8
commit f5ccd4faed

View File

@@ -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 {