Answer architecture round 2: refuse a self-read only inside what the binding lands on, fix the struct.go Layout line, move loneRef beside its caller, and widen item 83 to the link passes
This commit is contained in:
@@ -417,3 +417,9 @@ func TestANameReadAloneIsTheRecordColumnItReads(t *testing.T) {
|
||||
t.Errorf("NewRecordTemplate = %v, want a name-read column accepted inline", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAFieldBindingReadOutsideWhatItBindsLoads(t *testing.T) {
|
||||
if _, err := engine(1).NewTemplate(`{"format":"{x.y as n}{n}{n}{x}","x":{"format":"{z}","y":["a","b"],"z":"{n}"}}`); err != nil {
|
||||
t.Errorf("NewTemplate = %v, want a read of n from x.z, outside x.y, accepted", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user