-
Notifications
You must be signed in to change notification settings - Fork 18k
text/template: Unexpected assignment #56490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
Change https://go.dev/cl/446795 mentions this issue: |
romaindoumenc
pushed a commit
to TroutSoftware/go
that referenced
this issue
Nov 3, 2022
We were mishandling {{range $i = .}}, treating it as though it were {{range $i := .}}. That happened to work if $i were the most recently declared variable, but not otherwise. Fixes golang#56490 Change-Id: I222a009d671d86c06a980a54388e05f12101c00b Reviewed-on: https://go-review.googlesource.com/c/go/+/446795 Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Change https://go.dev/cl/503575 mentions this issue: |
Change https://go.dev/cl/503576 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Jun 15, 2023
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>
gopherbot
pushed a commit
that referenced
this issue
Jun 21, 2023
…ge assignment I unintentionally flipped them in CL 446795. For #56490 For #60801 Fixes #60802 Change-Id: I57586bec052e1b2cc61513870ce24dd6ce17e56b Reviewed-on: https://go-review.googlesource.com/c/go/+/503576 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This works as expected (stdout is
3
):Now, reverse the order of the first two lines of the template:
Stdout is
[1 2 3]
, but it should be3
.Same issue with
html/template
.The text was updated successfully, but these errors were encountered: