]> Cypherpunks.ru repositories - gostls13.git/commitdiff
go/types, types2: remove global goVersion flag (cleanup)
authorRobert Griesemer <gri@golang.org>
Wed, 19 Oct 2022 21:22:25 +0000 (14:22 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 19 Oct 2022 21:46:46 +0000 (21:46 +0000)
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 <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>

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

index 98813ad5a7695517afaf57d9021538c89b0be444..2d7783611de5b384b753ed7259a3ee0244905d4c 100644 (file)
@@ -41,7 +41,6 @@ import (
 var (
        haltOnError  = flag.Bool("halt", false, "halt on error")
        verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual")
-       goVersion    = flag.String("lang", "", "Go language version (e.g. \"go1.12\")")
 )
 
 func parseFiles(t *testing.T, filenames []string, mode syntax.Mode) ([]*syntax.File, []error) {
index da2cb6467f3897c4571f47efbbed1f901b619310..f19a904f7f2b582c4e615ddc27ad6fd952be10e1 100644 (file)
@@ -45,7 +45,6 @@ import (
 var (
        haltOnError  = flag.Bool("halt", false, "halt on error")
        verifyErrors = flag.Bool("verify", false, "verify errors (rather than list them) in TestManual")
-       goVersion    = flag.String("lang", "", "Go language version (e.g. \"go1.12\") for TestManual")
 )
 
 var fset = token.NewFileSet()
@@ -222,11 +221,6 @@ func testFiles(t *testing.T, sizes Sizes, filenames []string, srcs [][]byte, man
                t.Fatal(err)
        }
 
-       if manual && *goVersion != "" {
-               // goVersion overrides -lang for manual tests.
-               conf.GoVersion = *goVersion
-       }
-
        // TODO(gri) remove this or use flag mechanism to set mode if still needed
        if strings.HasSuffix(filenames[0], ".go1") {
                // TODO(rfindley): re-enable this test by using GoVersion.