Hold each name in one formatOps map, beside its first reader and path

This commit is contained in:
2026-09-29 11:20:09 +02:00
committed by Lillem4n
parent 1b219e333a
commit bb70688f1d
5 changed files with 34 additions and 38 deletions
+1 -1
View File
@@ -229,7 +229,7 @@ func (t *template) fixedText() (string, bool) {
// compiled reads.
func compileFormat(toks []formatToken, refs map[string]refBinding) (formatOps, error) {
c := compileOps(toks, refs)
if err := checkNoOverlap(c.ops, c.pathHeads); err != nil {
if err := checkNoOverlap(c); err != nil {
return c, err
}
return c, checkNoRepeatedRead(c)