Skip to content

Commit 6c83c1c

Browse files
karami-mehdiMehdi Karami
andauthored
Fix code formatting by removing extra backticks around Swift code snippets. (#2231)
Co-authored-by: Mehdi Karami <[email protected]>
1 parent 354de0c commit 6c83c1c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

proposals/0413-typed-throws.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -606,14 +606,11 @@ Therefore, these rules subsume those of untyped throws, and no existing code wil
606606

607607
Note that the constraint that the thrown error type must conform to `Error` means that one cannot use an existential type such as `any Error & Codable` as the thrown error type:
608608

609-
````swift
610609
```swift
611610
// error: any Error & Codable does not conform to Error
612611
func remoteCall(function: String) async throws(any Error & Codable) -> String { ... }
613612
```
614613

615-
````
616-
617614
The `any Error` existential has [special semantics](https://github.com/apple/swift-evolution/blob/main/proposals/0235-add-result.md#adding-swifterror-self-conformance) that allow it to conform to the `Error` protocol, introduced along with `Result`. A separate language change would be required to allow other existential types to conform to the `Error` protocol.
618615

619616
#### Catching typed thrown errors

0 commit comments

Comments
 (0)