Advertise only spellable paths, and name what a choice's variants share

This commit is contained in:
Mikael Göransson
2026-08-28 00:15:02 +02:00
committed by lilleman-tw
parent 595809bf38
commit 362c484825
5 changed files with 66 additions and 38 deletions
+5 -1
View File
@@ -91,7 +91,11 @@ func compileChoice(items []any) (node, error) {
}
c.cum = cum
}
c.shared = sharedPaths(c.items)
if len(c.items) > 1 {
// Safe to precompute: a choice's items come from one file, so no group can
// appear inside one, and neither mergeChildren nor linkRefs can reach in.
c.shared = sharedPaths(c.items)
}
return c, nil
}