aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/testdata/check/tinference.go2
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/compile/internal/types2/testdata/check/tinference.go2')
-rw-r--r--src/cmd/compile/internal/types2/testdata/check/tinference.go28
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/types2/testdata/check/tinference.go2 b/src/cmd/compile/internal/types2/testdata/check/tinference.go2
index 1b70981759..0afb77c1e4 100644
--- a/src/cmd/compile/internal/types2/testdata/check/tinference.go2
+++ b/src/cmd/compile/internal/types2/testdata/check/tinference.go2
@@ -23,7 +23,7 @@ type any interface{}
// f1(int(0), int(0))
// }
-func f2[A any, B interface{~[]A}](A, B)
+func f2[A any, B interface{~[]A}](A, B) {}
func _() {
f := f2[byte]
f(byte(0), []byte{})
@@ -39,7 +39,7 @@ func _() {
// f3(x, &x, &x)
// }
-func f4[A any, B interface{~[]C}, C interface{~*A}](A, B, C)
+func f4[A any, B interface{~[]C}, C interface{~*A}](A, B, C) {}
func _() {
f := f4[int]
var x int
@@ -47,14 +47,14 @@ func _() {
f4(x, []*int{}, &x)
}
-func f5[A interface{~struct{b B; c C}}, B any, C interface{~*B}](x B) A
+func f5[A interface{~struct{b B; c C}}, B any, C interface{~*B}](x B) A { panic(0) }
func _() {
x := f5(1.2)
var _ float64 = x.b
var _ float64 = *x.c
}
-func f6[A any, B interface{~struct{f []A}}](B) A
+func f6[A any, B interface{~struct{f []A}}](B) A { panic(0) }
func _() {
x := f6(struct{f []string}{})
var _ string = x