cmd/compile: remove typecheckdef and Name.Walkdef

The only remaining use for typecheckdef after CL 393256 is to
typecheck the ONAME node that represents function names, so we might
as well just move that code into tcFunc instead.

Updates #51691.

Change-Id: Icbca51d4b0fb33c90faa95f16254c7171b171d8a
Reviewed-on: https://go-review.googlesource.com/c/go/+/393367
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Matthew Dempsky 2022-03-15 22:44:31 -07:00
parent 8d4da2c7b5
commit 1cfe1007cd
8 changed files with 9 additions and 75 deletions

View file

@ -439,7 +439,6 @@ func (g *irgen) funcLit(typ2 types2.Type, expr *syntax.FuncLit) ir.Node {
for _, cv := range fn.ClosureVars {
cv.SetType(cv.Canonical().Type())
cv.SetTypecheck(1)
cv.SetWalkdef(1)
}
if g.topFuncIsGeneric {