[FIR] Add toString to all type scopes
This commit is contained in:
+4
@@ -87,4 +87,8 @@ class JavaAnnotationSyntheticPropertiesScope(
|
|||||||
override fun getClassifierNames(): Set<Name> {
|
override fun getClassifierNames(): Set<Name> {
|
||||||
return delegateScope.getClassifierNames()
|
return delegateScope.getClassifierNames()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Java annotation synthetic properties scope for $classId"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -133,4 +133,8 @@ class JavaClassMembersEnhancementScope(
|
|||||||
override fun mayContainName(name: Name): Boolean {
|
override fun mayContainName(name: Name): Boolean {
|
||||||
return useSiteMemberScope.mayContainName(name)
|
return useSiteMemberScope.mayContainName(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Java enhancement scope for ${owner.classId}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -501,6 +501,10 @@ class JavaClassUseSiteMemberScope(
|
|||||||
null
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Java use site scope of $classId"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun FirCallableSymbol<*>.isFromBuiltInClass(session: FirSession) =
|
private fun FirCallableSymbol<*>.isFromBuiltInClass(session: FirSession) =
|
||||||
|
|||||||
@@ -209,4 +209,8 @@ class JvmMappedScope(
|
|||||||
return Signatures(visibleMethodsByName, hiddenConstructors)
|
return Signatures(visibleMethodsByName, hiddenConstructors)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "JVM mapped scope for ${firKotlinClass.classId}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -347,6 +347,10 @@ class FirClassSubstitutionScope(
|
|||||||
override fun getClassifierNames(): Set<Name> {
|
override fun getClassifierNames(): Set<Name> {
|
||||||
return useSiteMemberScope.getClassifierNames()
|
return useSiteMemberScope.getClassifierNames()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Substitution scope for [$useSiteMemberScope] for type $dispatchReceiverTypeForSubstitutedMembers"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FirSubstitutionOverrideStorage(val session: FirSession) : FirSessionComponent {
|
class FirSubstitutionOverrideStorage(val session: FirSession) : FirSessionComponent {
|
||||||
|
|||||||
+4
@@ -55,4 +55,8 @@ class FirClassUseSiteMemberScope(
|
|||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Use site scope of $classId"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -83,4 +83,8 @@ class FirScopeWithFakeOverrideTypeCalculator(
|
|||||||
|
|
||||||
override val scopeOwnerLookupNames: List<String>
|
override val scopeOwnerLookupNames: List<String>
|
||||||
get() = delegate.scopeOwnerLookupNames
|
get() = delegate.scopeOwnerLookupNames
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return delegate.toString()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -127,6 +127,10 @@ class FirTypeIntersectionScope private constructor(
|
|||||||
return scopes.flatMapTo(hashSetOf()) { it.getClassifierNames() }
|
return scopes.flatMapTo(hashSetOf()) { it.getClassifierNames() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Intersection of [${scopes.joinToString(", ")}]"
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun prepareIntersectionScope(
|
fun prepareIntersectionScope(
|
||||||
session: FirSession,
|
session: FirSession,
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ abstract class FirTypeScope : FirContainingNamesAwareScope() {
|
|||||||
override fun getCallableNames(): Set<Name> = emptySet()
|
override fun getCallableNames(): Set<Name> = emptySet()
|
||||||
|
|
||||||
override fun getClassifierNames(): Set<Name> = emptySet()
|
override fun getClassifierNames(): Set<Name> = emptySet()
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Empty scope"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected companion object {
|
protected companion object {
|
||||||
|
|||||||
Reference in New Issue
Block a user