-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Description
Here is the simplest example I've been able to come up with:
public func function<each Element0, each Element1>(
_: (repeat (each Element0, each Element1))
) { }
You need that for the following kinds of stuff:
/// A tuple of pairs built out of two underlying tuples.
///
/// - Note: Unlike `zip` for sequences, these two tuples are required to have the same count.
@_documentation(visibility: private) // DocC can't cope with this signature.
@inlinable public func zip<each Element0, each Element1>(
_ element0: (repeat each Element0),
_ element1: (repeat each Element1)
) -> (repeat (each Element0, each Element1)) {
(repeat (each element0, each element1))
}
/// Equate tuples of tuples.
///
/// Tuples can't be considered `Equatable`,
/// so just using a version of `==` that compares parameters packs of `Equatables` is not adequate.
@_documentation(visibility: private) // DocC can't cope with this signature.
@inlinable public func == <each Element0: Equatable, each Element1: Equatable>(
_ element0: (repeat (each Element0, each Element1)),
_ element1: (repeat (each Element0, each Element1))
) -> Bool {
for elements in repeat (each element0, each element1) {
guard elements.0 == elements.1 else { return false }
}
return true
}
Checklist
- If possible, I've reproduced the issue using the
main
branch of this package. - This issue hasn't been addressed in an existing GitHub issue.
Expected Behavior
I don't have to add @_documentation(visibility: private)
to such code, and can document it! 📜
Actual behavior
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "symbols", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "swiftGenerics", intValue: nil), CodingKeys(stringValue: "constraints", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "kind", intValue: nil)], debugDescription: "Cannot initialize Kind from invalid String value sameShape", underlyingError: nil))
Command CompileDocumentation failed with a nonzero exit code
Steps To Reproduce
No response
Swift-DocC Version Information
Tip of main: 081ad56d004e854ee2309fa6f27ca8444d0b98dd
Swift Compiler Version Information
swift-driver version: 1.112.3 Apple Swift version 6.0 (swiftlang-6.0.0.6.8 clang-1600.0.23.1)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers