Skip to content

Commit

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

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

0 comments on commit 78896a1

Please sign in to comment.