aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/error_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/syntax/error_test.go')
-rw-r--r--src/cmd/compile/internal/syntax/error_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/syntax/error_test.go b/src/cmd/compile/internal/syntax/error_test.go
index 72b1ad6333..919667f1d3 100644
--- a/src/cmd/compile/internal/syntax/error_test.go
+++ b/src/cmd/compile/internal/syntax/error_test.go
@@ -128,6 +128,10 @@ func testSyntaxErrors(t *testing.T, filename string) {
}
defer f.Close()
+ var mode Mode
+ if strings.HasSuffix(filename, ".go2") {
+ mode = AllowGenerics
+ }
ParseFile(filename, func(err error) {
e, ok := err.(Error)
if !ok {
@@ -162,7 +166,7 @@ func testSyntaxErrors(t *testing.T, filename string) {
} else {
t.Errorf("%s: unexpected error: %s", orig, e.Msg)
}
- }, nil, 0)
+ }, nil, mode)
if *print {
fmt.Println()