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 _[a /* ERROR "type parameters must be named" */, b] struct{}
8 type _[a t, b t, c /* ERROR "type parameters must be named" */ ] struct{}
17 t [n, /* ERROR "unexpected comma; expecting ]" */ ]byte
22 m[ /* ERROR "method must have no type parameters" */ _ _, /* ERROR mixed */ _]()
27 func _[] /* ERROR "empty type parameter list" */ ()
28 func _[a /* ERROR "type parameters must be named" */, b ]()
29 func _[a t, b t, c /* ERROR "type parameters must be named" */ ]()
31 // TODO(rfindley) incorrect error message (see existing TODO in parser)
32 func f[a b, 0 /* ERROR "expected '\)', found 0" */ ] ()
38 _[a *t|[]int] struct{}
41 _[a *struct{}|t] struct{}
42 _[a *t|struct{}] struct{}
43 _[a *struct{}|~t] struct{}
49 _[a *t|t, b t] struct{}