When method talk
is called in C
object it goes to A
branch, and never goes to C
branch of embeddings. My question is which MRO used in Golang and where in standart it desctibed
package main
import "fmt"
type A struct {
Info string
}
func (a *A) talk() {
fmt.Printf("A from %s", a.Info)
}
type B struct{ A }
type C struct {
B
A
}
func main() {
c := C{
B: B{A{"B"}},
A: A{"A"},
}
c.talk()
}