blob: 4bc22324b6a15e641714b0a250a73f2666ed1885 [file] [log] [blame]
// +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()
}