-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
SymbolGraphGenThe swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfgeneric constraintsFeature → generics: generic constraintsFeature → generics: generic constraintsgenericsFeature: generic declarations and typesFeature: generic declarations and typessource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 5.8unexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output
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
SymbolGraphGenThe swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.The swiftSymbolGraphGen library, responsible for gathering and emitting symbol graphs.bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfgeneric constraintsFeature → generics: generic constraintsFeature → generics: generic constraintsgenericsFeature: generic declarations and typesFeature: generic declarations and typessource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 5.8unexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output