[AA] Add missing withValidityAssertion calls to scopes

^KT-58653
This commit is contained in:
Marco Pennekamp
2023-05-22 14:40:39 +02:00
committed by Space Team
parent 1d8eb6dc9e
commit 326b6fa7c2
5 changed files with 7 additions and 7 deletions
@@ -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 }
@@ -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 }