Debian Codegraph @

_test/recurse2.go

raw symbols SCIP
1 package main
2
3 type F func(a *A)
4
5 type A struct {
6 B string
7 D
8 f F
9 }
10
11 type D struct {
12 *A
13 E *A
14 }
15
16 func f1(a *A) { println("in f1", a.B) }
17
18 func main() {
19 a := &A{B: "b", f: f1}
20 a.D = D{E: a}
21 println(a.D.E.B)
22 a.f(a)
23 }
24
25 // Output:
26 // b
27 // in f1 b