Source file
test/fixedbugs/issue10353.go
1
2
3
4
5
6
7
8
9
10 package main
11
12 func main() {
13 c := make(chan bool)
14
15 go func() {
16 x := new(X)
17 clos(x.foo)()
18 c <- true
19 }()
20 <-c
21 }
22
23 type X int
24
25 func (x *X) foo() {
26 }
27
28 func clos(x func()) func() {
29 f := func() {
30 print("")
31 x()
32 }
33
34 growstack(10000)
35 c := make(chan bool)
36
37 go func() {
38 c <- true
39 }()
40 <-c
41 return f
42 }
43
44 func growstack(x int) {
45 if x == 0 {
46 return
47 }
48 growstack(x - 1)
49 }
50
View as plain text