aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2022-08-31 15:05:23 -0700
committerGopher Robot <gobot@golang.org>2022-09-02 02:14:56 +0000
commitd98bf7d0151c3feeceba6348519bb5c16e8ddc3f (patch)
treed21f6b74ad936e8b6a630f4228e1ffa4bebf03e6
parent4e32472e79e393675ba8489968539db5dc0ab650 (diff)
downloadgo-d98bf7d0151c3feeceba6348519bb5c16e8ddc3f.tar.xz
go/types, types2: consolidate testdata/fixedbugs/issue46404.go
Rename .../issue46404.go1 to .../issue46404.go so that it is not skipped anymore when running tests, and copy for types2. Disable the code for now due to a difference in error reporting due to the slightly different handling of index expressions. This allows us to make progress with test consolidation. For #54511. Change-Id: Ib5c9ffa49b1b24ec680ddb5001bc3dcb1df7eb1f Reviewed-on: https://go-review.googlesource.com/c/go/+/426656 Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
-rw-r--r--src/cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go (renamed from src/go/types/testdata/fixedbugs/issue46404.go1)4
-rw-r--r--src/go/types/testdata/fixedbugs/issue46404.go10
2 files changed, 13 insertions, 1 deletions
diff --git a/src/go/types/testdata/fixedbugs/issue46404.go1 b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go
index db604bc1ac..e3c93f66a8 100644
--- a/src/go/types/testdata/fixedbugs/issue46404.go1
+++ b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go
@@ -4,5 +4,7 @@
package issue46404
+// TODO(gri) re-enable this test with matching errors
+// between go/types and types2
// Check that we don't type check t[_] as an instantiation.
-type t [t /* ERROR not a type */ [_]]_ // ERROR cannot use
+// type t [t /* type parameters must be named */ /* not a generic type */ [_]]_ // cannot use
diff --git a/src/go/types/testdata/fixedbugs/issue46404.go b/src/go/types/testdata/fixedbugs/issue46404.go
new file mode 100644
index 0000000000..e3c93f66a8
--- /dev/null
+++ b/src/go/types/testdata/fixedbugs/issue46404.go
@@ -0,0 +1,10 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package issue46404
+
+// TODO(gri) re-enable this test with matching errors
+// between go/types and types2
+// Check that we don't type check t[_] as an instantiation.
+// type t [t /* type parameters must be named */ /* not a generic type */ [_]]_ // cannot use