From fe40e2ca951ea34a874edd04dd222f657ff63426 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 29 Sep 2026 16:34:05 +0200 Subject: [PATCH] Name the holding operand in the operand refusal, and an operand route's fix --- holdfence.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/holdfence.go b/holdfence.go index c895670..a86e9a3 100644 --- a/holdfence.go +++ b/holdfence.go @@ -77,6 +77,9 @@ func checkNameHeld(t *template, name string, readers []reader) error { return fmt.Errorf("%s reaches %q by a second route, where {%s} holds it to one draw; name the fields you want instead", e.reached(), name, path) } call, operand := operandReader(t, name) + if e.operand != "" { + return fmt.Errorf("%s renders %q, which {%s} holds to one draw for this expansion; stop %s reaching %q", e.reached(), name, call, e.reached(), name) + } return fmt.Errorf("%s renders %q, which {%s} holds to one draw for this expansion; drop %s, or write {%s} in this format to read that draw", e.reached(), name, call, e.reached(), operand) } return nil @@ -86,7 +89,7 @@ func checkNameHeld(t *template, name string, readers []reader) error { func operandReader(t *template, name string) (call, operand string) { for _, o := range t.compiled.ops { for _, a := range o.operands { - if a.head == name { + if a.head == name && !a.isRefPath() { return o.body, a.spelling } }