Answer stability round 2, prose round 2 and product-owner round 2: a head may be a name, scope and link come before the entries using them, a path reaches a node, and resolve ties a reference or a name

This commit is contained in:
2026-10-07 00:59:30 +02:00
committed by Lillem4n
parent 63223c6d63
commit d0886e4795
7 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -159,7 +159,7 @@ func checkArm(name string, fields map[string]node, wholeToken bool) (missing boo
}
return true, fmt.Errorf("no field %q", a.head)
}
if err := checkPathResolves(field, a.tail, a.head); err != nil {
if err := checkPathReaches(field, a.tail, a.head); err != nil {
return false, fmt.Errorf("field %q: %w", a.head, err)
}
return false, nil
@@ -341,7 +341,7 @@ func (t *template) compileArm(name string, targets map[*nameBinding]nameTarget)
}
target := targets[b]
full := append(target.tail[:len(target.tail):len(target.tail)], a.tail...)
if err := checkPathResolves(target.start, full, a.head); err != nil {
if err := checkPathReaches(target.start, full, a.head); err != nil {
return a, err
}
w := compilePath(target.start, full)