diff options
| author | Robert Griesemer <gri@golang.org> | 2022-03-29 17:30:58 -0700 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2022-03-30 18:02:31 +0000 |
| commit | bf408e741c2827a45c8576dda4126fc4135ef247 (patch) | |
| tree | b3b53677ad55c8cc5df1fd4586438aaf8cdebca2 /src/cmd/compile/internal/syntax/error_test.go | |
| parent | 717056da1a0086c5d1d1b27231a385f77ebc61d7 (diff) | |
| download | go-bf408e741c2827a45c8576dda4126fc4135ef247.tar.xz | |
cmd/compile/internal/syntax: remove generic-specific parse modes
Generics have landed; we cannot revert the syntax anymore. Remove
ability to choose between non-generic and generic code. Also remove
mode to enable method type parameters. Adjust code accordingly.
Also remove a couple of TODOs that are not relevant anymore.
Remove tests from types2 which were focussed on method type parameters,
make types2 and go/types tests match up where there was a difference in
this regard.
Change-Id: I989bdcb19eea7414214af739187fa013a044295d
Reviewed-on: https://go-review.googlesource.com/c/go/+/396634
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax/error_test.go')
| -rw-r--r-- | src/cmd/compile/internal/syntax/error_test.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/syntax/error_test.go b/src/cmd/compile/internal/syntax/error_test.go index 0900bec6ec..724ca0eb98 100644 --- a/src/cmd/compile/internal/syntax/error_test.go +++ b/src/cmd/compile/internal/syntax/error_test.go @@ -128,10 +128,6 @@ func testSyntaxErrors(t *testing.T, filename string) { } defer f.Close() - var mode Mode - if !strings.HasSuffix(filename, ".go117") { - mode = AllowGenerics - } ParseFile(filename, func(err error) { e, ok := err.(Error) if !ok { @@ -166,7 +162,7 @@ func testSyntaxErrors(t *testing.T, filename string) { } else { t.Errorf("%s:%s: unexpected error: %s", filename, orig, e.Msg) } - }, nil, mode) + }, nil, 0) if *print { fmt.Println() |
