Skip to content

Commit

Permalink
Revert "Fix another RPAA false-positive with inherited types"
Browse files Browse the repository at this point in the history
This reverts commit 78896a1.
  • Loading branch information
ileitch committed Dec 22, 2023
1 parent 78896a1 commit e2f5fe3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/PeripheryKit/Indexer/SwiftIndexer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,11 @@ public final class SwiftIndexer: Indexer {

for ref in decl.references.union(decl.related) {
if result.inheritedTypeLocations.contains(ref.location) {
if decl.kind == .protocol, ref.kind == .protocol {
ref.role = .refinedProtocolType
} else {
if (decl.kind == .class && ref.kind == .class) ||
(decl.kind == .associatedtype && ref.kind == .protocol) {
ref.role = .inheritedType
} else if decl.kind == .protocol, ref.kind == .protocol {
ref.role = .refinedProtocolType
}
} else if result.variableTypeLocations.contains(ref.location) {
ref.role = .varType
Expand Down

0 comments on commit e2f5fe3

Please sign in to comment.