blob: 4483cc1beef0958db5d251c0a42dd77842ad0894 [file] [log] [blame]
//go:build OMIT
package main
import "fmt"
type I interface {
M()
}
type T struct {
S string
}
// This method means type T implements the interface I,
// but we don't need to explicitly declare that it does so.
func (t T) M() {
fmt.Println(t.S)
}
func main() {
var i I = T{"hello"}
i.M()
}