'init'
This commit is contained in:
26
demo/test01.go
Normal file
26
demo/test01.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type a interface {
|
||||
}
|
||||
type b interface {
|
||||
}
|
||||
|
||||
type Stu struct {
|
||||
}
|
||||
|
||||
func (s Stu) a() {
|
||||
fmt.Println("aa")
|
||||
|
||||
}
|
||||
func (s Stu) b() {
|
||||
fmt.Println("bbb")
|
||||
}
|
||||
func main() {
|
||||
var s Stu
|
||||
var a = s
|
||||
var b = s
|
||||
a.b()
|
||||
b.a()
|
||||
}
|
||||
Reference in New Issue
Block a user