[Analysis API] change return type of KtScope.getAllSymbols to KtDeclaration symbol as it always returns callable or classifier
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ class KtCompositeScope(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getAllSymbols(): Sequence<KtSymbol> = withValidityAssertion {
|
||||
override fun getAllSymbols(): Sequence<KtDeclarationSymbol> = withValidityAssertion {
|
||||
sequence {
|
||||
subScopes.forEach { yieldAll(it.getAllSymbols()) }
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ class KtEmptyScope(override val token: KtLifetimeToken) : KtScope {
|
||||
return emptySet()
|
||||
}
|
||||
|
||||
override fun getAllSymbols(): Sequence<KtSymbol> = withValidityAssertion {
|
||||
override fun getAllSymbols(): Sequence<KtDeclarationSymbol> = withValidityAssertion {
|
||||
return emptySequence()
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ abstract class AbstractSymbolTest : AbstractAnalysisApiSingleFileTest() {
|
||||
is KtDeclarationSymbol -> symbol.render(prettyRenderOptions)
|
||||
is KtFileSymbol -> prettyPrint {
|
||||
printCollection(symbol.getFileScope().getAllSymbols().asIterable(), separator = "\n\n") {
|
||||
append((it as KtDeclarationSymbol).render(prettyRenderOptions))
|
||||
append(it.render(prettyRenderOptions))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user