ઓಆՄೳঢ়ଶ class Calm: PokemonStateType {} // ઓಆෆՄঢ়ଶ class Pokemon<T: PokemonStateType> { static func use() -> Pokemon<Calm> { return Pokemon<Calm>() } func ready() -> Pokemon<Struggle> { return Pokemon<Struggle>() } } extension Pokemon where T: Struggle { func attack() {} } ϙέϞϯʮઓಆঢ়ଶʯͱʮٳܜঢ়ଶʯΛ࣋ͭ class PokemonStateType {} class Struggle: PokemonStateType {} // ઓಆঢ়ଶ class Calm: PokemonStateType {} // ٳܜঢ়ଶ class Pokemon<T: PokemonStateType> { static func use() -> Pokemon<Calm> { return Pokemon<Calm>() } func ready() -> Pokemon<Struggle> { return Pokemon<Struggle>() } } extension Pokemon where T: Struggle { func attack() {} }