var sink interface{}
-func _() {
+func f1() {
var t T
f := t.noescape // ERROR "t.noescape does not escape"
f()
}
-func _() {
+func f2() {
var t T // ERROR "moved to heap"
f := t.escape // ERROR "t.escape does not escape"
f()
}
-func _() {
+func f3() {
var t T // ERROR "moved to heap"
f := t.returns // ERROR "t.returns does not escape"
sink = f()
}
}
-func _() int { // ERROR "can inline _"
+func f2() int { // ERROR "can inline f2"
tmp1 := h
tmp2 := tmp1
return tmp2(0) // ERROR "inlining call to h"
func k() (T, int, int) { return T{}, 0, 0 } // ERROR "can inline k"
-func _() { // ERROR "can inline _"
+func f3() { // ERROR "can inline f3"
T.meth(k()) // ERROR "inlining call to k" "inlining call to T.meth"
// ERRORAUTO "inlining call to T.meth"
}
// 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))
*/
func f2[A any, B interface{ type []A }](_ A, _ B)
-func _() {
+func f2x() {
f := f2[byte]
f(byte(0), []byte{})
f2(byte(0), []byte{})
// 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)
*/
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)
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
}