go/analysis/passes/modernize: avoid invalid stringscut fixes in multi-assignments
The stringscut modernizer could rewrite Index calls that appear in
multi-value assignments, producing invalid code such as:
ret, before, _, ok := 0, strings.Cut(s, sub)
Restrict the fix to single-name, single-value definitions, and add a
regression test covering the multi-assignment case.
Fixes golang/go#78643
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |