demo: workaround for reflect abi initialization on go@1.23

This commit is contained in:
Li Jie
2025-01-03 09:56:15 +08:00
parent e3a2d43ffa
commit 76fb91619a

View File

@@ -22,6 +22,8 @@ func main() {
println("closure", i) println("closure", i)
} }
} }
// TODO(lijie): WORKAROUND for reflect problem on go1.23
_ = any(reflect.Value{})
fns := []any{add, fn, fn1, fn2} fns := []any{add, fn, fn1, fn2}
for _, fn := range fns { for _, fn := range fns {
v := reflect.ValueOf(fn) v := reflect.ValueOf(fn)