package main

import (
"fmt"
)

type Person06 struct {
name string
sex string
age int
}

func (p *Person06) printInfo() {
fmt.Println(p)
}

type Student06 struct {
Person06
id int
}

//重写父类方法
func (s *Student06) printInfo() {
fmt.Println(s)
}

func main() {
var s Student06 = Student06{Person06{"yy", "男", 18}, 1}
(&s).printInfo()
(&s).Person06.printInfo()
}