code:
func printvar[T any](){
    var t T
    fmt.Println("T", t)
}

printvar[int]()

the function  instantiate in cmd/compile will instantiate a generic func,
func (check *Checker) instantiate(pos syntax.Pos, typ Type, targs []Type, 
poslist []syntax.Pos) (res Type)

but i look into the implement, i could not find the instantiate of temp var 
in generic func, just lkie var t T  up there.

i do find the instantiate of recieiver, param, result. so where is the 
instantiate of tmp var?

-- 
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/bde40557-5a05-403c-a77a-e9d1c0415815n%40googlegroups.com.

Reply via email to