]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/compile/internal/gc/sinit.go
[dev.ssa] Merge remote-tracking branch 'origin/master' into ssamerge
[gostls13.git] / src / cmd / compile / internal / gc / sinit.go
index 8af6ba24a231baeb6c6833b9768d833e51c41278..07177812f656fcead1a3e7db864710eae43a04c0 100644 (file)
@@ -475,7 +475,7 @@ func staticassign(l *Node, r *Node, out **NodeList) bool {
                break
 
        case OCLOSURE:
-               if r.Func.Cvars == nil {
+               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