From d98bf7d0151c3feeceba6348519bb5c16e8ddc3f Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 31 Aug 2022 15:05:23 -0700 Subject: [PATCH] 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 TryBot-Result: Gopher Robot Auto-Submit: Robert Griesemer Reviewed-by: Robert Findley Reviewed-by: Robert Griesemer --- .../internal/types2/testdata/fixedbugs/issue46404.go} | 4 +++- src/go/types/testdata/fixedbugs/issue46404.go | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) rename src/{go/types/testdata/fixedbugs/issue46404.go1 => cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go} (55%) create mode 100644 src/go/types/testdata/fixedbugs/issue46404.go diff --git a/src/go/types/testdata/fixedbugs/issue46404.go1 b/src/cmd/compile/internal/types2/testdata/fixedbugs/issue46404.go similarity index 55% rename from src/go/types/testdata/fixedbugs/issue46404.go1 rename to 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 -- 2.50.0