Skip to content

Commit

Permalink
go/ssa: remove references to GOEXPERIMENT range
Browse files Browse the repository at this point in the history
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Tim King <taking@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
  • Loading branch information
timothy-king authored and gopherbot committed Oct 1, 2024
1 parent a7552bc commit a2ff832
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
2 changes: 0 additions & 2 deletions go/ssa/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,6 @@ func TestMultipleGoversions(t *testing.T) {
// the type of each range var v (identified by print(v) calls)
// has the expected type.
func TestRangeOverInt(t *testing.T) {
testenv.NeedsGoExperiment(t, "range")

const rangeOverIntSrc = `
package p
Expand Down
1 change: 1 addition & 0 deletions go/ssa/interp/interp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ var testdataTests = []string{
"methprom.go",
"mrvchain.go",
"range.go",
"rangeoverint.go",
"recover.go",
"reflect.go",
"slice2arrayptr.go",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,6 @@ import (
"golang.org/x/tools/internal/testenv"
)

// TestExperimentRange tests files in testdata with GOEXPERIMENT=range set.
func TestExperimentRange(t *testing.T) {
testenv.NeedsGoExperiment(t, "range")

// TODO: Is cwd actually needed here?
goroot := makeGoroot(t)
cwd, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
run(t, filepath.Join(cwd, "testdata", "rangeoverint.go"), goroot)
}

func TestIssue69298(t *testing.T) {
testenv.NeedsGo1Point(t, 23)

Expand Down
4 changes: 1 addition & 3 deletions go/ssa/interp/testdata/rangeoverint.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

// Range over integers.

// Currently requires 1.22 and GOEXPERIMENT=range.
// Range over integers (Go 1.22).

import "fmt"

Expand Down

0 comments on commit a2ff832

Please sign in to comment.