1
0
mirror of https://github.com/golang/go synced 2024-11-16 22:44:49 -07:00
go/test/typeparam/issue50481.go
Robert Griesemer 11b28e7e98 test/typeparam: adjust test preamble (fix longtests)
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>
2022-01-07 06:34:04 +00:00

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