[AA] Add missing withValidityAssertion calls to scopes
^KT-58653
This commit is contained in:
committed by
Space Team
parent
1d8eb6dc9e
commit
326b6fa7c2
+2
-2
@@ -51,7 +51,7 @@ internal class KtFe10FileScope(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getCallableSymbols(names: Collection<Name>): Sequence<KtCallableSymbol> {
|
||||
override fun getCallableSymbols(names: Collection<Name>): Sequence<KtCallableSymbol> = withValidityAssertion {
|
||||
if (names.isEmpty()) return emptySequence()
|
||||
val namesSet = names.toSet()
|
||||
return getCallableSymbols { it in namesSet }
|
||||
@@ -71,7 +71,7 @@ internal class KtFe10FileScope(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> {
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
||||
if (names.isEmpty()) return emptySequence()
|
||||
val namesSet = names.toSet()
|
||||
return getClassifierSymbols { it in namesSet }
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ internal abstract class KtFe10ScopeResolution : KtScope, KtLifetimeOwner {
|
||||
.mapNotNull { it.toKtSymbol(analysisContext) as? KtCallableSymbol }
|
||||
}
|
||||
|
||||
override fun getCallableSymbols(names: Collection<Name>): Sequence<KtCallableSymbol> {
|
||||
override fun getCallableSymbols(names: Collection<Name>): Sequence<KtCallableSymbol> = withValidityAssertion {
|
||||
if (names.isEmpty()) return emptySequence()
|
||||
val namesSet = names.toSet()
|
||||
return getCallableSymbols { it in namesSet }
|
||||
@@ -48,7 +48,7 @@ internal abstract class KtFe10ScopeResolution : KtScope, KtLifetimeOwner {
|
||||
.mapNotNull { it.toKtSymbol(analysisContext) as? KtClassifierSymbol }
|
||||
}
|
||||
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> {
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
||||
if (names.isEmpty()) return emptySequence()
|
||||
val namesSet = names.toSet()
|
||||
return getClassifierSymbols { it in namesSet }
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ private class KtFirResolveExtensionScope(
|
||||
gelTopLevelDeclarations(nameFilter) { it.getTopLevelClassifiers() }
|
||||
}
|
||||
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> {
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
||||
if (names.isEmpty()) return emptySequence()
|
||||
val namesSet = names.toSet()
|
||||
return getClassifierSymbols { it in namesSet }
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ internal class KtFirDelegatedMemberScope(
|
||||
return super.getCallableSymbols(nameFilter).filter { it.origin == KtSymbolOrigin.DELEGATED }
|
||||
}
|
||||
|
||||
override fun getCallableSymbols(names: Collection<Name>): Sequence<KtCallableSymbol> {
|
||||
override fun getCallableSymbols(names: Collection<Name>): Sequence<KtCallableSymbol> = withValidityAssertion {
|
||||
return super.getCallableSymbols(names).filter { it.origin == KtSymbolOrigin.DELEGATED }
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ internal class KtFirFileScope(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> {
|
||||
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> = withValidityAssertion {
|
||||
if (names.isEmpty()) return emptySequence()
|
||||
val namesSet = names.toSet()
|
||||
return getClassifierSymbols { it in namesSet }
|
||||
|
||||
Reference in New Issue
Block a user