go/test/typeparam/issue50317.go
Robert Griesemer ab4556a93d test/typeparam: adjust test preamble (fix longtests)
For #50317.

Change-Id: I24ccf333c380283a36b573ef8fc3e7fcd71bd17f
Reviewed-on: https://go-review.googlesource.com/c/go/+/376215
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
2022-01-07 02:32:03 +00:00

16 lines
359 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 S struct{}
func (S) _[_ any]() {} // ERROR "method must have no type parameters"
type _ interface {
m[_ any]() // ERROR "method must have no type parameters"
}