aboutsummaryrefslogtreecommitdiff
path: root/internal/lsp/analysis/useany/testdata/src/a/a.go.golden
blob: efd8fd640a4ed779e54a34ffebba34cd8133e1fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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