// expected: closure captures outer variable(s) // // A Moxie closure is a standalone function: it receives what it needs through // its parameters and has no environment carrying outer locals. Legacy rejects // a capturing closure in restrict.go; stage4 accepted one, so a program that // only stage4 compiled could tie a closure's lifetime to a dead frame arena. package main func main() { x := int32(5) f := func() (r int32) { return x } println(f()) }