aboutsummaryrefslogtreecommitdiff
path: root/test/typeparam/issue45547.go
AgeCommit message (Collapse)Author
2021-07-28[dev.typeparams] test: rename blank functionsMatthew Dempsky
This CL renames blank functions in the test/ directory so that they don't rely on the compiler doing anything more than typechecking them. In particular, I ran this search to find files that used blank functions and methods: $ git grep -l '^func.*\b_(' | xargs grep -n '^' | grep '\.go:1:' | grep -v '// errorcheck$' I then skipped updating a few files: * blank.go * fixedbugs/issue11699.go * fixedbugs/issue29870.go These tests specifically check that blank functions/methods work. * interface/fail.go Not sure the motivation for the blank method here, but it's empty anyway. * typeparam/tparam1.go Type-checking test, but uses "-G" (to use types2 instead of typecheck). Updates #47446. Change-Id: I9ec1714f499808768bd0dcd7ae6016fb2b078e5e Reviewed-on: https://go-review.googlesource.com/c/go/+/338094 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2021-04-15cmd/compile: look for function in instantiations in all global assignmentsDan Scales
Add in some missing global assignment ops to the list of globals ops that should be traversed to look for generic function instantiations. The most common other one for global assigments (and the relevant one for this bug) is OAS2FUNC, but also look at global assigments with OAS2DOTTYPE, OAS2MAPR, OAS2RECV, and OASOP. Bonus small fix: get rid of -G=3 case in ir.IsAddressable. Now that we don't call the old typechecker from noder2, we don't need this -G-3 check anymore. Fixes #45547. Change-Id: I75fecec55ea0d6f62e1c2294d4d77447ed9be6ae Reviewed-on: https://go-review.googlesource.com/c/go/+/310210 Trust: Dan Scales <danscales@google.com> Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>