patch reflect: Zero/Len

This commit is contained in:
xushiwei
2024-06-20 23:40:35 +08:00
parent 28b3f6780c
commit 05031e0979
5 changed files with 505 additions and 1 deletions

View File

@@ -5,4 +5,7 @@ import "reflect"
func main() {
tyIntSlice := reflect.SliceOf(reflect.TypeOf(0))
println(tyIntSlice.String())
v := reflect.Zero(tyIntSlice)
println(v.Len())
}