On Fri, Mar 19, 2021 at 6:24 AM xie cui <cuiwei...@gmail.com> wrote: > > 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?
This code is under active development and is regularly changing. If you want to participate, I recommend that you read and comment on the patches, which are all sent to golang-codereviews. I don't think it will be helpful for the developers to spend time discussing how this code works while it is under development and being regularly changed. Thanks. 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/CAOyqgcUpYeKmkc0eb-d9F2xDQnCP7JPSSh7x8pG7OyC%3DUuM8sQ%40mail.gmail.com.