mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: eliminate NumFields wrapper functions
Change-Id: I3c6035559288cfdc33857216f50241b81932c8a4 Reviewed-on: https://go-review.googlesource.com/20811 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
15ed37d7b7
commit
dbed1c6361
8 changed files with 19 additions and 24 deletions
|
|
@ -1071,7 +1071,7 @@ func anylit(ctxt int, n *Node, var_ *Node, init *Nodes) {
|
|||
}
|
||||
|
||||
// initialize of not completely specified
|
||||
if var_.isSimpleName() || n.List.Len() < structcount(t) {
|
||||
if var_.isSimpleName() || n.List.Len() < t.NumFields() {
|
||||
a := Nod(OAS, var_, nil)
|
||||
typecheck(&a, Etop)
|
||||
walkexpr(&a, init)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue