1 // Copyright 2020 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 type t[a, b /* ERROR missing type constraint */ ] struct{}
8 type t[a t, b t, c /* ERROR missing type constraint */ ] struct{}
16 m /* ERROR method must have no type parameters */ [_ _, /* ERROR mixed */ _]()
20 func f[ /* ERROR empty type parameter list */ ]()
21 func f[a, b /* ERROR missing type constraint */ ]()
22 func f[a t, b t, c /* ERROR missing type constraint */ ]()
24 func f[a b, /* ERROR expected ] */ 0] ()
30 t[a *t|[]int] struct{}
33 t[a *struct{}|t] struct{}
34 t[a *t|struct{}] struct{}
35 t[a *struct{}|~t] struct{}
41 t[a *t|t, b t] struct{}
53 t [/* ERROR missing type parameter name or invalid array length */ t[t]]struct{}
54 t [t t[t], /* ERROR missing type parameter name */ t[t]]struct{}
55 t [/* ERROR missing type parameter name */ t[t], t t[t]]struct{}
56 t [/* ERROR missing type parameter name */ t[t], t[t]]struct{} // report only first error