diff --git a/src/boxes/map_box.rs b/src/boxes/map_box.rs index 23d1c637..f5f26aad 100644 --- a/src/boxes/map_box.rs +++ b/src/boxes/map_box.rs @@ -152,6 +152,13 @@ impl MapBox { { return value.share_box(); } + // Share identity for collection boxes to preserve mutability semantics + if value.as_any().downcast_ref::().is_some() { + return value.share_box(); + } + if value.as_any().downcast_ref::().is_some() { + return value.share_box(); + } value.clone_box() } None => Box::new(StringBox::new(&format!("[map/missing] Key not found: {}", key_str))), diff --git a/tools/hako_check/analysis_consumer.hako b/tools/hako_check/analysis_consumer.hako index 496b8966..34529211 100644 --- a/tools/hako_check/analysis_consumer.hako +++ b/tools/hako_check/analysis_consumer.hako @@ -21,6 +21,7 @@ static box HakoAnalysisBuilderBox { ir.set("boxes", new ArrayBox()) ir.set("methods", new ArrayBox()) ir.set("calls", new ArrayBox()) + ir.set("method_spans", new ArrayBox()) ir.set("source", text) local eps = new ArrayBox(); eps.push("Main.main"); eps.push("main"); ir.set("entrypoints", eps) // debug disabled in strict environments @@ -30,11 +31,11 @@ static box HakoAnalysisBuilderBox { local ast = null if no_ast == 0 { ast = HakoParserCoreBox.parse(text) } if ast != null { - // uses - local uses = ast.get("uses") + // uses (with fallback for backward compat) + local uses = ast.get("uses"); if uses == null { uses = ast.get("uses_arr") } if uses != null { local ui=0; while ui 0 {