mirror of
https://github.com/golang/go
synced 2024-11-26 02:07:57 -07:00
[dev.regabi] cmd/compile: prepare mknode for rename of Func.body
The next CL will rename Func.body to Func.Body_. At some point in the future we will rename it to Func.Body. Make the generator not get confused. Passes buildall w/ toolstash -cmp. Change-Id: Iee3f4915889a8287377bf3304d5b9250a909477e Reviewed-on: https://go-review.googlesource.com/c/go/+/275783 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
724374f859
commit
2de0af3b1b
@ -141,7 +141,7 @@ func forNodeFields(typName string, typ *types.Struct, f func(name string, is fun
|
||||
}
|
||||
switch typName {
|
||||
case "Func":
|
||||
if v.Name() != "body" {
|
||||
if strings.ToLower(strings.TrimSuffix(v.Name(), "_")) != "body" {
|
||||
continue
|
||||
}
|
||||
case "Name", "Pack":
|
||||
|
Loading…
Reference in New Issue
Block a user