aboutsummaryrefslogtreecommitdiff
path: root/gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden
diff options
context:
space:
mode:
Diffstat (limited to 'gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden')
-rw-r--r--gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden25
1 files changed, 25 insertions, 0 deletions
diff --git a/gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden b/gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden
new file mode 100644
index 000000000..efd8fd640
--- /dev/null
+++ b/gopls/internal/lsp/analysis/useany/testdata/src/a/a.go.golden
@@ -0,0 +1,25 @@
+// 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.
+
+// This file contains tests for the useany checker.
+
+package a
+
+type Any interface{}
+
+func _[T any]() {} // want "could use \"any\" for this empty interface"
+func _[X any, T any]() {} // want "could use \"any\" for this empty interface"
+func _[any interface{}]() {} // want "could use \"any\" for this empty interface"
+func _[T any]() {} // want "could use \"any\" for this empty interface"
+func _[T any]() {} // want "could use \"any\" for this empty interface"
+func _[T any]() {} // want "could use \"any\" for this empty interface"
+func _[T any]() {}
+
+type _[T any] int // want "could use \"any\" for this empty interface"
+type _[X any, T any] int // want "could use \"any\" for this empty interface"
+type _[any interface{}] int // want "could use \"any\" for this empty interface"
+type _[T any] int // want "could use \"any\" for this empty interface"
+type _[T any] int // want "could use \"any\" for this empty interface"
+type _[T any] int // want "could use \"any\" for this empty interface"
+type _[T any] int