feat: complete handling of switch case statements (#88)

This commit is contained in:
Marc Vertes
2019-02-11 18:42:00 +01:00
committed by Ludovic Fernandez
parent 6d21cefe75
commit ef83e43bd7
32 changed files with 2048 additions and 210 deletions

31
_test/interface3.go Normal file
View File

@@ -0,0 +1,31 @@
package main
import "fmt"
type fii interface {
Hello()
}
type Boo struct {
Name string
}
func (b Boo) Hello() {
fmt.Println("Hello", b)
fmt.Println(b.Name)
}
func inCall(foo fii) {
fmt.Println("inCall")
foo.Hello()
}
func main() {
boo := Boo{"foo"}
inCall(boo)
}
// Output:
// inCall
// Hello {foo}
// foo