Fix at compile how readField reads an arm, deleting its two panics and its held lookup per read

This commit is contained in:
2026-09-30 20:35:41 +02:00
committed by Lillem4n
parent efbad0f325
commit 26b35abe70
3 changed files with 18 additions and 8 deletions
+6
View File
@@ -112,6 +112,12 @@ func compileArm(t *template, a *arm) {
}
w := compilePath(head, a.tail)
a.steps, a.leaves, a.cover = w.steps, w.leaves, w.cover
switch _, held := t.compiled.held[a.head]; {
case a.isRefPath():
a.kind = refPathRead
case held:
a.kind = heldRead
}
}
// resolveLink binds every reference t reads, refusing one to t's own category, and keys