I have a type T which embed type B, and *B implements I. *T can be assigned to a variable of type I but not in the case of T, does this mean (*T)'s method set contains both value and pointer receiver of B?
package main
import (
"fmt"
)
type I interface {
Foo()
}
type B struct {}
type T struct {
B
}
func (a *B) Foo() {
fmt.Println("Bar")
}
func main() {
t := T{B{}}
// var i I = t -> error
var i I = &t
i.Foo()
}