Keep in a pick only what reads of its name address, look frames up on the stack alone, and refuse a name read once whole

This commit is contained in:
2026-10-03 02:36:12 +02:00
committed by Lillem4n
parent 685e7bb27c
commit b1aed332e7
15 changed files with 455 additions and 231 deletions
+10 -5
View File
@@ -181,10 +181,15 @@ func linkNodeRefs(scope nodeScope, root map[string]node) error {
}); err != nil {
return err
}
return scope(func(path string, m node) error {
if t, ok := m.(*template); ok {
return linkNames(path, t)
for _, pass := range []func(string, *template) error{linkNames, checkNameReads} {
if err := scope(func(path string, m node) error {
if t, ok := m.(*template); ok {
return pass(path, t)
}
return nil
}); err != nil {
return err
}
return nil
})
}
return nil
}