Skip to content

Commit a2ff832

Browse files
timothy-kinggopherbot
authored andcommitted
go/ssa: remove references to GOEXPERIMENT range
Range over int is in all supported Go versions for x/tools. Change-Id: I16d3da47121fcf34251fa5cad9561848ef699a56 Reviewed-on: https://go-review.googlesource.com/c/tools/+/616977 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Tim King <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent a7552bc commit a2ff832

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

go/ssa/builder_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,8 +1291,6 @@ func TestMultipleGoversions(t *testing.T) {
12911291
// the type of each range var v (identified by print(v) calls)
12921292
// has the expected type.
12931293
func TestRangeOverInt(t *testing.T) {
1294-
testenv.NeedsGoExperiment(t, "range")
1295-
12961294
const rangeOverIntSrc = `
12971295
package p
12981296

go/ssa/interp/interp_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ var testdataTests = []string{
124124
"methprom.go",
125125
"mrvchain.go",
126126
"range.go",
127+
"rangeoverint.go",
127128
"recover.go",
128129
"reflect.go",
129130
"slice2arrayptr.go",

go/ssa/interp/interp_go122_test.go renamed to go/ssa/interp/rangefunc_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@ import (
1616
"golang.org/x/tools/internal/testenv"
1717
)
1818

19-
// TestExperimentRange tests files in testdata with GOEXPERIMENT=range set.
20-
func TestExperimentRange(t *testing.T) {
21-
testenv.NeedsGoExperiment(t, "range")
22-
23-
// TODO: Is cwd actually needed here?
24-
goroot := makeGoroot(t)
25-
cwd, err := os.Getwd()
26-
if err != nil {
27-
log.Fatal(err)
28-
}
29-
run(t, filepath.Join(cwd, "testdata", "rangeoverint.go"), goroot)
30-
}
31-
3219
func TestIssue69298(t *testing.T) {
3320
testenv.NeedsGo1Point(t, 23)
3421

go/ssa/interp/testdata/rangeoverint.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package main
22

3-
// Range over integers.
4-
5-
// Currently requires 1.22 and GOEXPERIMENT=range.
3+
// Range over integers (Go 1.22).
64

75
import "fmt"
86

0 commit comments

Comments
 (0)