mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: change Func.Cvars to the new Nodes type
Update #14473. Change-Id: Iba1ecf42d9ab5a93144941439d5cc6b0b4f4a3ac Reviewed-on: https://go-review.googlesource.com/19992 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
7da4ceddd0
commit
922ce58de0
6 changed files with 12 additions and 33 deletions
|
|
@ -475,7 +475,7 @@ func staticassign(l *Node, r *Node, out **NodeList) bool {
|
|||
break
|
||||
|
||||
case OCLOSURE:
|
||||
if len(r.Func.Cvars()) == 0 {
|
||||
if len(r.Func.Cvars.Slice()) == 0 {
|
||||
// Closures with no captured variables are globals,
|
||||
// so the assignment can be done at link time.
|
||||
n := *l
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue