copier
copier copied to clipboard
Copy Nested structs and pointers panic
Like this
type Elem1 struct {
E Elem1
E1 int
}
type Elem2 struct {
E Elem2
E1 int
}
type A struct {
B Elem1
}
type C struct {
B Elem2
}
a := new(A)
c := new(C)
copy(c, a)
will panic
struct Elem1 includes Elem1?