Avatar
Swift.ErrorはExtension with Generic Where Clauseで。 public enum Result<Value, Error> { case success(Value), failure(Error) // … } extension Result where Error: Swift.Error { /*…*/ } extension Result where Error == Swift.Error { /*…*/ } https://github.com/apple/swift-evolution/blob/master/proposals/0235-add-result.md#detailed-design (edited)
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - apple/swift-evolution