]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: verify that rangefunc assigning to no vars works
authorDavid Chase <drchase@google.com>
Tue, 2 Jul 2024 16:45:30 +0000 (12:45 -0400)
committerDavid Chase <drchase@google.com>
Tue, 30 Jul 2024 15:02:02 +0000 (15:02 +0000)
commit4f237ffd16ef1ff11f8fb80083457a47028954ff
tree23ea0dc7e2993225fd0dcd7f55f9570b3e418d32
parentd0a468e52c6f7bc7e3cb4731f03e1693eb535a38
cmd/compile: verify that rangefunc assigning to no vars works

This adds a test for
   for range seq2rangefunc { ... }
and
   for onevar := range seq2rangefunc { ... }

For #65236.

Change-Id: I083f8e4c19eb4ba0d6024d5314ac29d941141778
Reviewed-on: https://go-review.googlesource.com/c/go/+/596135
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/rangefunc/rangefunc_test.go