-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[SR-13930] Index store does not relate objc optional protocol method implemented in subclass #56327
Copy link
Copy link
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.classFeature → type declarations: Class declarationsFeature → type declarations: Class declarationsconformancesFeature → protocol: protocol conformancesFeature → protocol: protocol conformancesdeclarationsFeature: declarationsFeature: declarationsindexingArea → source tooling: AST indexingArea → source tooling: AST indexinginheritanceFeature → type declarations → class: Subclassing and inheritance of class membersFeature → type declarations → class: Subclassing and inheritance of class membersoptional protocol requirementsFeature → protocol: optional protocol requirementsFeature → protocol: optional protocol requirementsprotocolFeature → type declarations: Protocol declarationsFeature → type declarations: Protocol declarationssource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 5.9unexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.classFeature → type declarations: Class declarationsFeature → type declarations: Class declarationsconformancesFeature → protocol: protocol conformancesFeature → protocol: protocol conformancesdeclarationsFeature: declarationsFeature: declarationsindexingArea → source tooling: AST indexingArea → source tooling: AST indexinginheritanceFeature → type declarations → class: Subclassing and inheritance of class membersFeature → type declarations → class: Subclassing and inheritance of class membersoptional protocol requirementsFeature → protocol: optional protocol requirementsFeature → protocol: optional protocol requirementsprotocolFeature → type declarations: Protocol declarationsFeature → type declarations: Protocol declarationssource toolingArea: IDE support, SourceKit, and other source toolingArea: IDE support, SourceKit, and other source toolingswift 5.9unexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output
Type
Fields
Give feedbackNo fields configured for issues without a type.

Environment
Swift 5.3.1
Additional Detail from JIRA
md5: b4e60253efa0e8c7ffa0ba78d8eff02f
Issue Description:
Given the following code:
The index store does not relate the method implemented in the subclass to the protocol declaration, although it does so for the method implemented in the baseclass. From the perspective of detecting unused code, it's not possible to identify that
fileManager(_:shouldRemoveItemAtPath:)is an implementation of the protocol method.Method in subclass:
Method in baseclass, note the extra `RelOver`: