You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change adds additional checking to ensure that rangeint
won't offer a fix in cases where RHS of 'i < limit' depends on loop var.
Given the code snippet below, this change will no longer offer a wrong fix as it did before.
var n, kd int
for j := 0; j < min(n-j, kd+1); j++ {
}
- offered fix before(build error 'undefined: j')
var n, kd int
for j := range min(n-j, kd+1){
}
Fixesgolang/go#72726
Change-Id: I78c5457406258c44dd2fa861aa43d9ddb9c707fc
Reviewed-on: https://go-review.googlesource.com/c/tools/+/656975
Reviewed-by: Alan Donovan <[email protected]>
Auto-Submit: Alan Donovan <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
0 commit comments