]> Cypherpunks repositories - gostls13.git/commitdiff
go/types, types2: consolidate testdata/fixedbugs/issue46404.go
authorRobert Griesemer <gri@golang.org>
Wed, 31 Aug 2022 22:05:23 +0000 (15:05 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 2 Sep 2022 02:14:56 +0000 (02:14 +0000)
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>
src/cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go [moved from src/go/types/testdata/fixedbugs/issue46404.go1 with 55% similarity]
src/go/types/testdata/fixedbugs/issue46404.go [new file with mode: 0644]

similarity index 55%
rename from src/go/types/testdata/fixedbugs/issue46404.go1
rename to src/cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go
index db604bc1ac3e3337ef42fa694fb0757b13998f00..e3c93f66a85938999e65dbdd0d80be83533aa75b 100644 (file)
@@ -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 (file)
index 0000000..e3c93f6
--- /dev/null
@@ -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