|
|
Previous ID |
SR-15556 |
Radar |
rdar://problem/86089651 |
Original Reporter |
@heckj |
Type |
Bug |
Attachment: Download
Environment
Happens with both Xcode 13.1 and Version 13.2 beta 2 (13C5081f)
Additional Detail from JIRA
|
|
Votes |
0 |
Component/s |
Swift-DocC, Swift-DocC-Render |
Labels |
Bug |
Assignee |
None |
Priority |
Medium |
md5: deb5998f8c142585ed2da631bc6fe8b3
Issue Description:
I'm not certain where the duplication comes from - but when I'm working on documenting a struct that has synthesized conformances, I'm seeing some replicated "Default Implementations" sections with the various operators.
The specific case that illustrates this is a struct that has an extenion where it conforms to Comparable. For detail, an example struct:
```
public struct ObjectId: Equatable, Hashable, Codable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation {
init(_ objectId: String = UUID().uuidString)
{ self.objectId = objectId }
let objectId: String
public init(from decoder: Decoder) throws
{ let container = try decoder.singleValueContainer() self.objectId = try container.decode(String.self) }
public func encode(to encoder: Encoder) throws
{ var container = encoder.singleValueContainer() try container.encode(objectId) }
static let root: ObjectId = "_root"
static let head: ObjectId = "_head"
public init(stringLiteral value: StringLiteralType)
{ self.objectId = value }
func parseOpId() -> (counter: Int, actorId: String)? {
guard objectId.contains("@") else
{ return nil }
let splitted = objectId.split(separator: "@")
return (counter: Int(String(splitted[0]))!, actorId: String(splitted[1]))
}
}
extension ObjectId: Comparable {
public static func < (lhs: ObjectId, rhs: ObjectId) -> Bool
{ return lhs.objectId < rhs.objectId }
}
```
The resulting documentation exposed (through Xcode, or `docc-preview` on the CLI) shows the attached screenshot. Within each of the sections listed as 'Implementations' with nothing preceding it, are the same operators- screenshot of those attached as well. They're all from Comparable:
```
static func ... (Self) -> PartialRangeThrough<Self>
static func ... (Self) -> PartialRangeFrom<Self>
static func ... (Self, Self) -> ClosedRange<Self>
static func ..< (Self) -> PartialRangeUpTo<Self>
static func ..< (Self, Self) -> Range<Self>
```