Skip to content
Snippets Groups Projects
user avatar
Keith Randall authored
When replacing a loop where the iteration variable has a named type,
we need to compute the last iteration value as i = T(len(a)-1), not
just i = len(a)-1.

Fixes #73491

Change-Id: Ic1cc3bdf8571a40c10060f929a9db8a888de2b70
Reviewed-on: https://go-review.googlesource.com/c/go/+/667815


Reviewed-by: default avatarCuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@google.com>
Reviewed-by: default avatarJunyang Shao <shaojunyang@google.com>
Reviewed-by: default avatarKeith Randall <khr@google.com>
3452d80d
History
Name Last commit Last update