Pull in latest Go template source

This commit is contained in:
Bjørn Erik Pedersen
2021-01-29 17:15:42 +01:00
parent 21e9eb18ac
commit ccb822eb5a
11 changed files with 157 additions and 20 deletions

View File

@@ -373,6 +373,10 @@ func (s *state) walkRange(dot reflect.Value, r *parse.RangeNode) {
if val.IsNil() {
break
}
if val.Type().ChanDir() == reflect.SendDir {
s.errorf("range over send-only channel %v", val)
break
}
i := 0
for ; ; i++ {
elem, ok := val.Recv()