3 // Tests of defer. (Deferred recover() belongs is recover.go.)
7 func deferMutatesResults(noArgReturn bool) (a, b int) {
10 panic(fmt.Sprint(a, b))
22 a, b := deferMutatesResults(true)
24 panic(fmt.Sprint(a, b))
26 a, b = deferMutatesResults(false)
28 panic(fmt.Sprint(a, b))
32 // We concatenate init blocks to make a single function, but we must
33 // run defers at the end of each block, not the combined function.
45 // Strictly speaking the spec says deferCount may be 0 or 2
46 // since the relative order of init blocks is unspecified.
48 panic(deferCount) // defer call has not run!