You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"fmt""reflect"
)
funcadd(a, bint) int {
returna+b
}
funcmain() {
fn:=func(a, bint) int {
returna+b
}
v:=reflect.ValueOf(fn)
fmt.Println(v.Type())
fmt.Println(v.Kind())
v=reflect.ValueOf(add)
fmt.Println(v.Type())
fmt.Println(v.Kind())
}
(base) ➜ llgo git:(py-dev) ✗ go run ./cmd/llgo run ./_demo/reflect
struct {...}
struct
struct {...}
struct
(base) ➜ llgo git:(py-dev) ✗ go run ./_demo/reflect
func(int, int) int
func
func(int, int) int
func
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: