Files
moxa/_test/method5.go
Ludovic Fernandez 73afc090bb refactor: enhance consistency tests. (#53)
* test: remove limit.

* test: skip btln.go

* test: adds tests on errors.

* feat: add missing output results.

* refactor: time's tests.
2019-01-28 15:19:52 +01:00

45 lines
453 B
Go

package main
import "fmt"
type Foo struct {
}
func (Foo) Show() {
fmt.Println("Foo Showed")
}
func (f Foo) Call() {
fmt.Println("Foo Called")
f.Show()
}
type Bar struct {
Foo
}
type Baz struct {
Foo
}
func (Baz) Call() {
fmt.Println("Baz Called")
}
func (Baz) Show() {
fmt.Println("Baz Showed")
}
func main() {
Foo{}.Call()
Bar{}.Call()
Baz{}.Call()
}
// Output:
// Foo Called
// Foo Showed
// Foo Called
// Foo Showed
// Baz Called