On Mon, May 23, 2022 at 5:14 PM Wenhua Shi <march...@gmail.com> wrote:
>
> >  return New(TypeOf("Interface {}"))
> Yes, it gives a string. It doesn't matter here since it's only an edge case.
>
> >  What is the full stack trace

Thanks.

I don't understand what is going on here:


    for idx := range funcs {
            ft := funcs[idx].Func.Type().common()
            ft.uncommon()

            ifn := funcs[idx].Func
            methods = append(methods, method{
                name: resolveReflectName(newName(funcs[idx].Name, "", true)),
                mtyp: resolveReflectType(ft),
                ifn:  resolveReflectText(unsafe.Pointer(&ifn)),
                tfn:  resolveReflectText(unsafe.Pointer(&ifn)),
            })
        }

It looks like ifn will be type reflect.Value.  But you are setting ifn
to the address of that Value.  That doesn't make sense to me.  ifn and
tfn need to refer to executable code.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcV%3DW-F5%2BchtVnGd%2BkTFbA0i6ind60Q%2B6G%3DpY1aw%3Db8ZKg%40mail.gmail.com.

Reply via email to