You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Swift generated interface, extensions to generic types with constraints on their generic parameters all show that constraint. This implies that the extensions (and the conformances they add) are conditionally available, even though they're always there. For example, Set constrains its Element type to Hashable, and every extension for Set in the generated interface shows the where Element : Hashable constraint:
extensionSet : ExpressibleByArrayLiteralwhereElement : Hashable {
/// Creates a set containing the elements of the given array literal./// ...publicinit(arrayLiteralelements: Set<Element>.Element...)
}
extensionSet : SequencewhereElement : Hashable {
/// Returns an iterator over the members of the set.publicfuncmakeIterator() -> SetIterator<Element>
/// Returns a Boolean value that indicates whether the given element exists/// in the set./// ...publicfunccontains(_member: Set<Element>.Element) -> Bool
}
This is technically correct, since the constraint is met for all these extensions, but it's superfluous and confusing for readers of the interface.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: c59d0511f5c32100f740918b2169d7d3
Issue Description:
In the Swift generated interface, extensions to generic types with constraints on their generic parameters all show that constraint. This implies that the extensions (and the conformances they add) are conditionally available, even though they're always there. For example,
Set
constrains itsElement
type toHashable
, and every extension forSet
in the generated interface shows thewhere Element : Hashable
constraint:This is technically correct, since the constraint is met for all these extensions, but it's superfluous and confusing for readers of the interface.
The text was updated successfully, but these errors were encountered: