runtime/internal/lib/reflect: fix funcOf for runtime

This commit is contained in:
visualfc
2025-06-12 16:12:34 +08:00
parent 84729e21b8
commit 20a7d0f120

View File

@@ -1220,7 +1220,9 @@ func FuncOf(in, out []Type, variadic bool) Type {
// Populate the remaining fields of ft and store in cache.
ft.Str_ = str
ft.PtrToThis_ = nil
return addToCache(&ft.Type)
rt := runtime.Func(ft.In, ft.Out, variadic)
return addToCache(&rt.Type)
}
func stringFor(t *abi.Type) string {