diff options
| author | Ian Lance Taylor <iant@golang.org> | 2023-06-14 16:17:31 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-06-15 14:28:01 +0000 |
| commit | befec5ddbbfbd81ec84e74e15a38044d67f8785b (patch) | |
| tree | 5edafebd597560be442bac7094a55fea59fd8322 /src/text/template/exec_test.go | |
| parent | c5463218a228b082661df3f5f1ba0492a4d3df18 (diff) | |
| download | go-befec5ddbbfbd81ec84e74e15a38044d67f8785b.tar.xz | |
text/template: set variables correctly in range assignment
I unintentionally flipped them in CL 446795.
For #56490
Fixes #60801
Change-Id: I57586bec052e1b2cc61513870ce24dd6ce17e56b
Reviewed-on: https://go-review.googlesource.com/c/go/+/503575
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/text/template/exec_test.go')
| -rw-r--r-- | src/text/template/exec_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/text/template/exec_test.go b/src/text/template/exec_test.go index 40e3c5e0b4..6eb0d41a51 100644 --- a/src/text/template/exec_test.go +++ b/src/text/template/exec_test.go @@ -694,6 +694,7 @@ var execTests = []execTest{ {"bug18c", "{{eq . 'P'}}", "true", 'P', true}, {"issue56490", "{{$i := 0}}{{$x := 0}}{{range $i = .AI}}{{end}}{{$i}}", "5", tVal, true}, + {"issue60801", "{{$k := 0}}{{$v := 0}}{{range $k, $v = .AI}}{{$k}}={{$v}} {{end}}", "0=3 1=4 2=5 ", tVal, true}, } func zeroArgs() string { |
