From 88548d988a5ea3f4d9ab96ebe8a7631ce06cb64b Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Sat, 4 Jul 2020 00:37:51 +0300 Subject: [PATCH] FIR IDE: implement getCallableNames/getClassifierNames in more scopes --- .../org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt | 8 ++++++++ .../kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt b/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt index 83e9ea2237c..f24e18446d6 100644 --- a/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt +++ b/compiler/fir/jvm/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt @@ -76,6 +76,14 @@ class JvmMappedScope( declaredMemberScope.processClassifiersByNameWithSubstitution(name, processor) } + override fun getCallableNames(): Set { + return declaredMemberScope.getCallableNames() + } + + override fun getClassifierNames(): Set { + return declaredMemberScope.getClassifierNames() + } + companion object { data class Signatures(val whiteListSignaturesByName: Map>, val constructorBlackList: Set) { fun isEmpty() = whiteListSignaturesByName.isEmpty() && constructorBlackList.isEmpty() diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt index 7a1403301a6..09153ce14df 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirClassSubstitutionScope.kt @@ -521,6 +521,14 @@ class FirClassSubstitutionScope( processor(constructor) } } + + override fun getCallableNames(): Set { + return useSiteMemberScope.getCallableNames() + } + + override fun getClassifierNames(): Set { + return useSiteMemberScope.getClassifierNames() + } } // Unlike other cases, return types may be implicit, i.e. unresolved