File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
server/src/main/kotlin/org/javacs/kt/index Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -59,23 +59,18 @@ class SymbolIndex {
59
59
Symbols .deleteAll()
60
60
61
61
for (descriptor in descriptors) {
62
- val fqn = descriptor.fqNameSafe
63
- val extensionReceiverFqn = descriptor.accept(ExtractSymbolExtensionReceiverType , Unit )
62
+ val descriptorFqn = descriptor.fqNameSafe
63
+ val extensionReceiverFqn = descriptor.accept(ExtractSymbolExtensionReceiverType , Unit )?. takeIf { ! it.isRoot }
64
64
65
- FqNames .replace {
66
- it[fqName] = fqn.toString()
67
- it[shortName] = fqn.shortName().toString()
68
- }
69
-
70
- extensionReceiverFqn?.let { rFqn ->
65
+ for (fqn in listOf (descriptorFqn, extensionReceiverFqn).filterNotNull()) {
71
66
FqNames .replace {
72
- it[fqName] = rFqn .toString()
73
- it[shortName] = rFqn .shortName().toString()
67
+ it[fqName] = fqn .toString()
68
+ it[shortName] = fqn .shortName().toString()
74
69
}
75
70
}
76
71
77
72
Symbols .replace {
78
- it[fqName] = fqn .toString()
73
+ it[fqName] = descriptorFqn .toString()
79
74
it[kind] = descriptor.accept(ExtractSymbolKind , Unit ).rawValue
80
75
it[visibility] = descriptor.accept(ExtractSymbolVisibility , Unit ).rawValue
81
76
it[extensionReceiverType] = extensionReceiverFqn?.toString()
You can’t perform that action at this time.
0 commit comments