Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumGostruct embedding and promotionSingle-choice MCQ

A struct embeds two different types, A and B, that each have a method Foo(). What happens?

type A struct{} func (A) Foo() {} type B struct{} func (B) Foo() {} type C struct { A; B } func main() { var c C c.Foo() }