protocol static 実験
protocol Person {
static func memo()
}
class Taro: Person {
static func memo() {
print("taro")
}
}
class Hanako: Person {
static func memo() {
print("hanako")
}
}
func Output(type: Person.Type) -> Void {
type.memo()
}
Output(type: Taro.self) //taro
Output(type: Hanako.self) //hanako