1
2
3
4
5
6
7
8
9
10 package p
11
12 func F() {
13 var a []int
14 var c chan int
15 var m map[int]int
16
17 close(c)
18 copy(a, a)
19 delete(m, 0)
20 panic(0)
21 print("foo")
22 println("bar")
23 recover()
24
25 (close(c))
26 (copy(a, a))
27 (delete(m, 0))
28 (panic(0))
29 (print("foo"))
30 (println("bar"))
31 (recover())
32
33 go close(c)
34 go copy(a, a)
35 go delete(m, 0)
36 go panic(0)
37 go print("foo")
38 go println("bar")
39 go recover()
40
41 defer close(c)
42 defer copy(a, a)
43 defer delete(m, 0)
44 defer panic(0)
45 defer print("foo")
46 defer println("bar")
47 defer recover()
48 }
49
View as plain text