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 {
5959 Symbols .deleteAll()
6060
6161 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 }
6464
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()) {
7166 FqNames .replace {
72- it[fqName] = rFqn .toString()
73- it[shortName] = rFqn .shortName().toString()
67+ it[fqName] = fqn .toString()
68+ it[shortName] = fqn .shortName().toString()
7469 }
7570 }
7671
7772 Symbols .replace {
78- it[fqName] = fqn .toString()
73+ it[fqName] = descriptorFqn .toString()
7974 it[kind] = descriptor.accept(ExtractSymbolKind , Unit ).rawValue
8075 it[visibility] = descriptor.accept(ExtractSymbolVisibility , Unit ).rawValue
8176 it[extensionReceiverType] = extensionReceiverFqn?.toString()
You can’t perform that action at this time.
0 commit comments