Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 0c7ae14

Browse files
Lukas-Stuehrkmattt
andauthored
Make prefix and postfix operator implementations appear in the documentation. (#262)
* Make prefix and postfix operators appear in the documentation. * Add changelog entry for #262 Co-authored-by: Mattt <mattt@me.com>
1 parent 70d4afd commit 0c7ae14

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fixed bug that caused prefix and postfix operators to be omitted
13+
from generated documentation.
14+
#262 by @Lukas-Stuehrk.
15+
1016
## [1.0.0-beta.6] - 2021-04-24
1117

1218
### Added

Sources/swift-doc/Supporting Types/Components/OperatorImplementations.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ struct OperatorImplementations: Component {
5353

5454
heading = [lhs.type, function.name, rhs.type].compactMap { $0 }.joined(separator: " ")
5555
case .prefix:
56-
guard function.signature.input.count == 2,
56+
guard function.signature.input.count == 1,
5757
let operand = function.signature.input.first
5858
else {
5959
return nil
6060
}
6161
heading = [function.name, operand.type].compactMap { $0 }.joined(separator: " ")
6262

6363
case .postfix:
64-
guard function.signature.input.count == 2,
64+
guard function.signature.input.count == 1,
6565
let operand = function.signature.input.first
6666
else {
6767
return nil

0 commit comments

Comments
 (0)