Files
moxa/_test/struct46.go
2020-05-28 08:52:03 +02:00

22 lines
174 B
Go

package main
import "fmt"
type A struct {
B string
C D
}
type D struct {
E *A
}
func main() {
a := &A{B: "b"}
a.C = D{E: a}
fmt.Println(a.C.E.B)
}
// Output:
// b