Skip to content

Commit

Permalink
emit overridden_symbols for methods (and fix filter conditioin)
Browse files Browse the repository at this point in the history
  • Loading branch information
Strum355 committed Jul 17, 2023
1 parent 1987d46 commit 9340b61
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.jetbrains.kotlin.com.intellij.psi.PsiElement
import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
import org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
import org.jetbrains.kotlin.idea.KotlinLanguage
import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc.fqnString
import org.jetbrains.kotlin.psi.KtConstructor
Expand Down Expand Up @@ -66,10 +67,14 @@ class SemanticdbTextDocumentBuilder(
.getAllSuperClassifiers()
// first is the class itself
.drop(1)
.filter { it.fqnString == "kotlin.Any" || it.fqnString == "java.lang.Object" }
.filter {
it.fqnString != "kotlin.Any" && it.fqnString != "java.lang.Object"
}
.flatMap { cache[it] }
.map { it.toString() }
.asIterable()
is SimpleFunctionDescriptor ->
descriptor.overriddenDescriptors.flatMap { cache[it] }.map { it.toString() }
else -> emptyList<String>().asIterable()
}
return SymbolInformation {
Expand Down

0 comments on commit 9340b61

Please sign in to comment.