Skip to content

Commit caf42a5

Browse files
committed
Fix cross reference and wording
1 parent d724f48 commit caf42a5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

TSPL.docc/ReferenceManual/Declarations.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,8 +1465,7 @@ func <#function name#>(<#parameters#>) throws -> <#return type#> {
14651465
}
14661466
```
14671467

1468-
A function that declares what error type it throws
1469-
has the following form:
1468+
A function that throws a specific error type has the following form:
14701469

14711470
```swift
14721471
func <#function name#>(<#parameters#>) throws(<#error type#>) -> <#return type#> {
@@ -1482,11 +1481,11 @@ Rule for inferring the thrown error type
14821481
Xref to the guide <doc:ErrorHandling#Specifying-a-Concrete-Error-Type>
14831482
-->
14841483

1485-
A functions type includes whether it throws,
1484+
A function's type includes whether it can throw an error,
14861485
and what type of error it throws.
1487-
As a result, you can use a nonthrowing function
1486+
This means, for example, you can use a nonthrowing function
14881487
in a context where a throwing one is expected.
1489-
For more information, see <doc:Types#Throwing-Functions>.
1488+
For more information, see <doc:Types#Function-Type>.
14901489

14911490
You can't overload a function based only on whether the function can throw an error.
14921491
That said,

0 commit comments

Comments
 (0)