mirror of
https://github.com/golang/go
synced 2024-11-17 07:35:05 -07:00
11b28e7e98
For #50481. Change-Id: I27e6c6499d6abfea6e215d8aedbdd5074ff88291 Reviewed-on: https://go-review.googlesource.com/c/go/+/376216 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
22 lines
857 B
Go
22 lines
857 B
Go
// errorcheck -G=3
|
|
|
|
// Copyright 2022 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 p
|
|
|
|
type _[_ any] struct{}
|
|
type _[_, _ any] struct{} // ERROR "cannot have multiple blank type parameters"
|
|
type _[_, _, _ any] struct{} // ERROR "cannot have multiple blank type parameters"
|
|
type _[a, _, b, _, c, _ any] struct{} // ERROR "cannot have multiple blank type parameters"
|
|
|
|
func _[_ any]() {}
|
|
func _[_, _ any]() {} // ERROR "cannot have multiple blank type parameters"
|
|
func _[_, _, _ any]() {} // ERROR "cannot have multiple blank type parameters"
|
|
func _[a, _, b, _, c, _ any]() {} // ERROR "cannot have multiple blank type parameters"
|
|
|
|
type S[P1, P2 any] struct{}
|
|
|
|
func (_ S[_, _]) m() {} // this is ok
|