Open
Description
SymbolGraphGen always drops generic constraints if they are conforms(to: AnyObject)
:
public
enum Enum<T>
{
}
extension Enum where T:AnyObject
{
var member:Void { return }
}
extension Enum where T:Sendable
{
var other:Void { return }
}
other constraints, including Sendable
obviously do not exhibit this behavior.
{
"kind": {
"identifier": "swift.property",
"displayName": "Instance Property"
},
"identifier": {
"precise": "s:20AnyObjectConstraints4EnumOAARlzClE6memberytvp",
"interfaceLanguage": "swift"
},
"pathComponents": [
"Enum",
"member"
],
"names": {
"title": "member",
"subHeading": [
{
"kind": "keyword",
"spelling": "var"
},
{
"kind": "text",
"spelling": " "
},
{
"kind": "identifier",
"spelling": "member"
},
{
"kind": "text",
"spelling": ": "
},
{
"kind": "typeIdentifier",
"spelling": "Void",
"preciseIdentifier": "s:s4Voida"
}
]
},
"swiftExtension": {
"extendedModule": "AnyObjectConstraints",
"typeKind": "swift.enum"
},
"declarationFragments": [
{
"kind": "keyword",
"spelling": "var"
},
{
"kind": "text",
"spelling": " "
},
{
"kind": "identifier",
"spelling": "member"
},
{
"kind": "text",
"spelling": ": "
},
{
"kind": "typeIdentifier",
"spelling": "Void",
"preciseIdentifier": "s:s4Voida"
},
{
"kind": "text",
"spelling": " { "
},
{
"kind": "keyword",
"spelling": "get"
},
{
"kind": "text",
"spelling": " }"
}
],
"accessLevel": "internal",
"location": {
"uri": "file:///swift/swift-unidoc/TestModules/Snippets/AnyObjectConstraints.swift",
"position": {
"line": 7,
"character": 8
}
}
},
{
"kind": {
"identifier": "swift.property",
"displayName": "Instance Property"
},
"identifier": {
"precise": "s:20AnyObjectConstraints4EnumOAAs8SendableRzlE5otherytvp",
"interfaceLanguage": "swift"
},
"pathComponents": [
"Enum",
"other"
],
"names": {
"title": "other",
"subHeading": [
{
"kind": "keyword",
"spelling": "var"
},
{
"kind": "text",
"spelling": " "
},
{
"kind": "identifier",
"spelling": "other"
},
{
"kind": "text",
"spelling": ": "
},
{
"kind": "typeIdentifier",
"spelling": "Void",
"preciseIdentifier": "s:s4Voida"
}
]
},
"swiftExtension": {
"extendedModule": "AnyObjectConstraints",
"typeKind": "swift.enum",
"constraints": [
{
"kind": "conformance",
"lhs": "T",
"rhs": "Sendable",
"rhsPrecise": "s:s8SendableP"
}
]
},
"declarationFragments": [
{
"kind": "keyword",
"spelling": "var"
},
{
"kind": "text",
"spelling": " "
},
{
"kind": "identifier",
"spelling": "other"
},
{
"kind": "text",
"spelling": ": "
},
{
"kind": "typeIdentifier",
"spelling": "Void",
"preciseIdentifier": "s:s4Voida"
},
{
"kind": "text",
"spelling": " { "
},
{
"kind": "keyword",
"spelling": "get"
},
{
"kind": "text",
"spelling": " }"
}
],
"accessLevel": "internal",
"location": {
"uri": "file:///swift/swift-unidoc/TestModules/Snippets/AnyObjectConstraints.swift",
"position": {
"line": 11,
"character": 8
}
}
},
Metadata
Metadata
Assignees
Labels
The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.A deviation from expected or documented behavior. Also: expected but undesirable behavior.The Swift compiler itselfFeature → generics: generic constraintsFeature: generic declarations and typesArea: IDE support, SourceKit, and other source toolingBug: Unexpected behavior or incorrect output