]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/closure.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / closure.go
index c2248d68e95773a78d3e1d9b53edd17ad55da47a..c4a312464bcf4e130143941e67421b1a1615fa94 100644 (file)
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
 
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// Test the behavior of closures.
+
 package main
 
 import "runtime"
@@ -79,6 +81,7 @@ func h() {
 func newfunc() func(int) int { return func(x int) int { return x } }
 
 func main() {
+       runtime.GOMAXPROCS(1)
        var fail bool
 
        go f()