iter 22b.3.5: fix — quality-review (chained-call test, hoist class_index, drop noise comments)

This commit is contained in:
2026-05-09 20:59:43 +02:00
parent dd87b36e00
commit e8018d48b6
3 changed files with 126 additions and 7 deletions
+1 -7
View File
@@ -74,14 +74,10 @@ pub fn monomorphise_workspace(ws: &Workspace) -> Result<Workspace> {
return Ok(ws.clone());
}
// Take ownership of a mutable workspace clone; the pass
// appends synthesised defs to per-module def lists.
let mut ws_owned: Workspace = ws.clone();
let env = build_workspace_env(&ws_owned);
let class_index = build_class_index(&ws_owned);
// Dedup set: every (class, method, type-hash) we have already
// synthesised. Once a key is here, future collection rounds
// skip it.
let mut synthesised: BTreeSet<(String, String, String)> = BTreeSet::new();
// Fixpoint: keep collecting until a round adds nothing new.
@@ -117,7 +113,6 @@ pub fn monomorphise_workspace(ws: &Workspace) -> Result<Workspace> {
// truth for ClassDef + InstanceDef lookups. Both come
// from the un-modified workspace registry — synthesis
// never mutates the registry.
let class_index = build_class_index(&ws_owned);
for t in &new {
let key = mono_target_key(t);
let registry_key = (t.class.clone(), ailang_core::canonical::type_hash(&t.type_));
@@ -153,7 +148,6 @@ pub fn monomorphise_workspace(ws: &Workspace) -> Result<Workspace> {
}
}
// Task 6 will splice the call-site rewrite here.
Ok(ws_owned)
}