Avatar
部分集合じゃなくて継承だったかな? ぱっと見見つからない https://forums.swift.org/t/enum-inheritance/9933
Pitch: allow enums to inherit cases. Is this idea sound? Is this even possible given the current compiler implementation? Would this be a complex feature to implement for someone who isn’t familiar with the compiler’s codebase? Example: enum NetworkError: Error { case timedOut case cannotFindHost case notConnectedToInternet } enum MyAPIError: NetworkError { case responseInvalid case sessionExpired case notEnoughMinerals case insufficientVespineGas } func didRece...