aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam
diff options
context:
space:
mode:
Diffstat (limited to 'test/typeparam')
-rw-r--r--test/typeparam/issue45547.go2
-rw-r--r--test/typeparam/typelist.go14
2 files changed, 8 insertions, 8 deletions
diff --git a/test/typeparam/issue45547.go b/test/typeparam/issue45547.go
index 0a08d66b70..b354d4d7f6 100644
--- a/test/typeparam/issue45547.go
+++ b/test/typeparam/issue45547.go
@@ -11,7 +11,7 @@ func f[T any]() (f, g T) { return f, g }
// Tests for generic function instantiation on the right hande side of multi-value
// assignments.
-func _() {
+func g() {
// Multi-value assignment within a function
var _, _ = f[int]()
}
diff --git a/test/typeparam/typelist.go b/test/typeparam/typelist.go
index 3d035bf457..a68ae1b5cd 100644
--- a/test/typeparam/typelist.go
+++ b/test/typeparam/typelist.go
@@ -69,14 +69,14 @@ func _[V any, T interface{ type map[string]V }](p T) V {
// Cannot embed stand-alone type parameters. Disabled for now.
/*
func f0[A any, B interface{type C}, C interface{type D}, D interface{type A}](A, B, C, D)
-func _() {
+func f0x() {
f := f0[string]
f("a", "b", "c", "d")
f0("a", "b", "c", "d")
}
func f1[A any, B interface{type A}](A, B)
-func _() {
+func f1x() {
f := f1[int]
f(int(0), int(0))
f1(int(0), int(0))
@@ -86,7 +86,7 @@ func _() {
*/
func f2[A any, B interface{ type []A }](_ A, _ B)
-func _() {
+func f2x() {
f := f2[byte]
f(byte(0), []byte{})
f2(byte(0), []byte{})
@@ -97,7 +97,7 @@ func _() {
// Cannot embed stand-alone type parameters. Disabled for now.
/*
func f3[A any, B interface{type C}, C interface{type *A}](a A, _ B, c C)
-func _() {
+func f3x() {
f := f3[int]
var x int
f(x, &x, &x)
@@ -106,7 +106,7 @@ func _() {
*/
func f4[A any, B interface{ type []C }, C interface{ type *A }](_ A, _ B, c C)
-func _() {
+func f4x() {
f := f4[int]
var x int
f(x, []*int{}, &x)
@@ -119,14 +119,14 @@ func f5[A interface {
c C
}
}, B any, C interface{ type *B }](x B) A
-func _() {
+func f5x() {
x := f5(1.2)
var _ float64 = x.b
var _ float64 = *x.c
}
func f6[A any, B interface{ type struct{ f []A } }](B) A
-func _() {
+func f6x() {
x := f6(struct{ f []string }{})
var _ string = x
}