From f7ddcd2795ee5997d3ee9ab2cbfdb11385e9802d Mon Sep 17 00:00:00 2001 From: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Tue, 18 Nov 2025 18:00:41 +0200 Subject: [PATCH] Break after annotation future found (#6284) --- crates/codegen/src/symboltable.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/crates/codegen/src/symboltable.rs b/crates/codegen/src/symboltable.rs index 0464e09c1..3c8454b9e 100644 --- a/crates/codegen/src/symboltable.rs +++ b/crates/codegen/src/symboltable.rs @@ -736,12 +736,10 @@ impl SymbolTableBuilder { if let Stmt::ImportFrom(StmtImportFrom { module, names, .. }) = &statement && module.as_ref().map(|id| id.as_str()) == Some("__future__") { - for feature in names { - if &feature.name == "annotations" { - self.future_annotations = true; - } - } + self.future_annotations = + self.future_annotations || names.iter().any(|future| &future.name == "annotations"); } + match &statement { Stmt::Global(StmtGlobal { names, .. }) => { for name in names {