From 20a7d0f12095a6d06916a3ce4be361da6a64c018 Mon Sep 17 00:00:00 2001 From: visualfc Date: Thu, 12 Jun 2025 16:12:34 +0800 Subject: [PATCH] runtime/internal/lib/reflect: fix funcOf for runtime --- runtime/internal/lib/reflect/type.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/internal/lib/reflect/type.go b/runtime/internal/lib/reflect/type.go index ea59bfaa..5ff924ce 100644 --- a/runtime/internal/lib/reflect/type.go +++ b/runtime/internal/lib/reflect/type.go @@ -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 {