Skip to content

Commit bfcc3a7

Browse files
griesemergopherbot
authored andcommitted
go/types, types2: remove global goVersion flag (cleanup)
Now that we have an easy mechanism to set the Go version with a comment line directly in test files, we don't need this flag anymore. Change-Id: Ic1f1a6fdf2c6c692512bff49650916ec43645aee Reviewed-on: https://go-review.googlesource.com/c/go/+/444275 Reviewed-by: Robert Findley <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Run-TryBot: Robert Griesemer <[email protected]> Auto-Submit: Robert Griesemer <[email protected]>
1 parent 6fe3ccd commit bfcc3a7

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

src/cmd/compile/internal/types2/check_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import (
4141
var (
4242
haltOnError = flag.Bool("halt", false, "halt on error")
4343
verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual")
44-
goVersion = flag.String("lang", "", "Go language version (e.g. \"go1.12\")")
4544
)
4645

4746
func parseFiles(t *testing.T, filenames []string, mode syntax.Mode) ([]*syntax.File, []error) {

src/go/types/check_test.go

-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import (
4545
var (
4646
haltOnError = flag.Bool("halt", false, "halt on error")
4747
verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual")
48-
goVersion = flag.String("lang", "", "Go language version (e.g. \"go1.12\") for TestManual")
4948
)
5049

5150
var fset = token.NewFileSet()
@@ -222,11 +221,6 @@ func testFiles(t *testing.T, sizes Sizes, filenames []string, srcs [][]byte, man
222221
t.Fatal(err)
223222
}
224223

225-
if manual && *goVersion != "" {
226-
// goVersion overrides -lang for manual tests.
227-
conf.GoVersion = *goVersion
228-
}
229-
230224
// TODO(gri) remove this or use flag mechanism to set mode if still needed
231225
if strings.HasSuffix(filenames[0], ".go1") {
232226
// TODO(rfindley): re-enable this test by using GoVersion.

0 commit comments

Comments
 (0)