Debian Codegraph @

_test/struct47.go

raw symbols SCIP
1 package main
2
3 import "fmt"
4
5 type A struct {
6 B string
7 C D
8 }
9
10 func (a *A) Test() string {
11 return "test"
12 }
13
14 type D struct {
15 E *A
16 }
17
18 func main() {
19 a := &A{B: "b"}
20 d := D{E: a}
21 a.C = d
22 fmt.Println(a.C.E.Test())
23 }
24
25 // Output:
26 // test