Avatar
omochimetaru 8/23/2017 8:55 AM
class Animal { var switcher: AnimalTypeSwitcher { switch self { case let cat as Cat: return .cat(cat) case let dog as Dog: return .dog(dog) default: fatalError("invalid") } } }