We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac8a86d commit 3c2816aCopy full SHA for 3c2816a
TSPL.docc/ReferenceManual/Types.md
@@ -376,6 +376,11 @@ As a result of these subtype relationships:
376
- You can use a function that throws a more specific error type
377
in the same places as a function that throws a more general error type.
378
379
+If you use an associated type or a generic type parameter
380
+as the thrown error type in a function type,
381
+then that associated type or generic type parameter
382
+is implicitly required to conform to the `Error` protocol.
383
+
384
Throwing and rethrowing functions are described in
385
<doc:Declarations#Throwing-Functions-and-Methods>
386
and <doc:Declarations#Rethrowing-Functions-and-Methods>.
0 commit comments