diff --git a/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/TestScopeRenderer.kt b/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/TestScopeRenderer.kt index eac05e46b76..98561058546 100644 --- a/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/TestScopeRenderer.kt +++ b/analysis/analysis-api-impl-base/tests/org/jetbrains/kotlin/analysis/api/impl/base/test/cases/components/scopeProvider/TestScopeRenderer.kt @@ -16,6 +16,8 @@ import org.jetbrains.kotlin.analysis.api.renderer.types.renderers.KtTypeErrorTyp import org.jetbrains.kotlin.analysis.api.scopes.KtScope import org.jetbrains.kotlin.analysis.api.symbols.DebugSymbolRenderer import org.jetbrains.kotlin.analysis.api.symbols.KtDeclarationSymbol +import org.jetbrains.kotlin.analysis.api.symbols.KtPackageSymbol +import org.jetbrains.kotlin.analysis.api.symbols.KtSymbol import org.jetbrains.kotlin.analysis.api.types.KtType import org.jetbrains.kotlin.analysis.utils.printer.PrettyPrinter import org.jetbrains.kotlin.analysis.utils.printer.prettyPrint @@ -44,6 +46,15 @@ internal object TestScopeRenderer { } } + context(KtAnalysisSession) + fun PrettyPrinter.renderForTests( + scope: KtScope, + printPretty: Boolean, + additionalSymbolInfo: KtAnalysisSession.(KtSymbol) -> String? = { null } + ) { + renderScopeMembers(scope, printPretty, additionalSymbolInfo) + } + context (KtAnalysisSession) private fun renderType( type: KtType, @@ -63,50 +74,70 @@ internal object TestScopeRenderer { fullyPrintScope: (KtScopeKind) -> Boolean, ) { for (scopeWithKind in scopeContext.scopes) { - appendLine(renderForTests(scopeWithKind.scope, scopeWithKind.kind, printPretty, fullyPrintScope)) + renderForTests(scopeWithKind.scope, scopeWithKind.kind, printPretty, fullyPrintScope) + appendLine() } } context (KtAnalysisSession) - private fun renderForTests( + private fun PrettyPrinter.renderForTests( scope: KtScope, scopeKind: KtScopeKind, printPretty: Boolean, fullyPrintScope: (KtScopeKind) -> Boolean, - ): String = prettyPrint { - append("${scopeKind::class.simpleName}, index = ${scopeKind.indexInTower}") + ) { + appendLine("${scopeKind::class.simpleName}, index = ${scopeKind.indexInTower}") if (!fullyPrintScope(scopeKind)) { - appendLine() - return@prettyPrint + return } - renderScopeMembers(scope, printPretty) + withIndent { + renderScopeMembers(scope, printPretty) { null } + } } context (KtAnalysisSession) - private fun PrettyPrinter.renderScopeMembers(scope: KtScope, printPretty: Boolean) { - val callables = scope.getCallableSymbols().toList() - val classifiers = scope.getClassifierSymbols().toList() - val isEmpty = callables.isEmpty() && classifiers.isEmpty() - if (isEmpty) { - appendLine(", empty") - } else { - appendLine() + private fun PrettyPrinter.renderScopeMembers( + scope: KtScope, + printPretty: Boolean, + additionalSymbolInfo: KtAnalysisSession.(KtSymbol) -> String?, + ) { + fun List.renderAll( + symbolKind: String, + renderPrettySymbol: KtAnalysisSession.(T) -> String, + ) { + appendLine("$symbolKind: $size") withIndent { - appendLine("classifiers: ${classifiers.size}") - withIndent { classifiers.forEach { appendLine(renderSymbol(it, printPretty)) } } - appendLine("callables: ${callables.size}") - withIndent { callables.forEach { appendLine(renderSymbol(it, printPretty)) } } + forEach { + appendLine( + if (printPretty) { + this@KtAnalysisSession.renderPrettySymbol(it) + } else { + debugRenderer.render(it) + } + ) + this@KtAnalysisSession.additionalSymbolInfo(it)?.let { + withIndent { appendLine(it) } + } + } } } + + scope.getPackageSymbols() + .toMutableList() + .apply { sortBy { it.fqName.asString() } } + .renderAll("packages") { prettyRenderPackage(it) } + scope.getClassifierSymbols().toList().renderAll("classifiers") { prettyRenderDeclaration(it) } + scope.getCallableSymbols().toList().renderAll("callables") { prettyRenderDeclaration(it) } + scope.getConstructors().toList().renderAll("constructors") { prettyRenderDeclaration(it) } } - context(KtAnalysisSession) - private fun renderSymbol( - symbol: KtDeclarationSymbol, - printPretty: Boolean - ): String = if (printPretty) symbol.render(prettyPrintSymbolRenderer) else debugRenderer.render(symbol) + private fun KtAnalysisSession.prettyRenderPackage(symbol: KtPackageSymbol): String = + symbol.fqName.asString() + + private fun KtAnalysisSession.prettyRenderDeclaration(symbol: KtDeclarationSymbol): String = + symbol.render(prettyPrintSymbolRenderer) private val debugRenderer = DebugSymbolRenderer() diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.pretty.txt index e99a60b0fab..fde327d8048 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.pretty.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -12,5 +16,9 @@ scopes: PackageMemberScope, index = 5 - ExplicitSimpleImportingScope, index = 6, empty + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.txt index fe32527725e..fde327d8048 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/errorImport.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -12,6 +16,9 @@ scopes: PackageMemberScope, index = 5 - ExplicitSimpleImportingScope, index = 6, empty - + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.pretty.txt index 3cea2c25cc7..00be3f664a3 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.pretty.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -13,6 +17,9 @@ scopes: PackageMemberScope, index = 5 ExplicitSimpleImportingScope, index = 6 + packages: 0 classifiers: 1 class A callables: 0 + constructors: 0 + diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.txt index a08f6a73add..fbfd7b904d3 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/importAlias.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -13,6 +17,7 @@ scopes: PackageMemberScope, index = 5 ExplicitSimpleImportingScope, index = 6 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -38,4 +43,5 @@ scopes: typeParameters: [] visibility: Public callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.pretty.txt index e99a60b0fab..fde327d8048 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.pretty.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -12,5 +16,9 @@ scopes: PackageMemberScope, index = 5 - ExplicitSimpleImportingScope, index = 6, empty + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.txt index fe32527725e..fde327d8048 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/noImports.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -12,6 +16,9 @@ scopes: PackageMemberScope, index = 5 - ExplicitSimpleImportingScope, index = 6, empty - + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.pretty.txt index 3cea2c25cc7..00be3f664a3 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.pretty.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -13,6 +17,9 @@ scopes: PackageMemberScope, index = 5 ExplicitSimpleImportingScope, index = 6 + packages: 0 classifiers: 1 class A callables: 0 + constructors: 0 + diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.txt index a08f6a73add..fbfd7b904d3 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/simpleImport.txt @@ -4,7 +4,11 @@ scopes: DefaultSimpleImportingScope, index = 1 - ExplicitStarImportingScope, index = 2, empty + ExplicitStarImportingScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -13,6 +17,7 @@ scopes: PackageMemberScope, index = 5 ExplicitSimpleImportingScope, index = 6 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -38,4 +43,5 @@ scopes: typeParameters: [] visibility: Public callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.pretty.txt index 682419915be..10bcb9fa505 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.pretty.txt @@ -5,10 +5,12 @@ scopes: DefaultSimpleImportingScope, index = 1 ExplicitStarImportingScope, index = 2 + packages: 0 classifiers: 1 class A callables: 1 fun b() + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -16,5 +18,9 @@ scopes: PackageMemberScope, index = 5 - ExplicitSimpleImportingScope, index = 6, empty + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.txt b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.txt index ec02098f5ae..8f235013905 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/importingScopeContext/starImport.txt @@ -5,6 +5,7 @@ scopes: DefaultSimpleImportingScope, index = 1 ExplicitStarImportingScope, index = 2 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -57,6 +58,7 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 DefaultSimpleImportingScope, index = 3 @@ -64,6 +66,9 @@ scopes: PackageMemberScope, index = 5 - ExplicitSimpleImportingScope, index = 6, empty - + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.pretty.txt index fdecdcff98f..245e1a2d4c6 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.pretty.txt @@ -4,32 +4,59 @@ implicit receivers: owner symbol: KtFirFunctionSymbol scopes: - LocalScope, index = 0, empty + LocalScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 1 + packages: 0 classifiers: 0 callables: 4 fun memberInContext() fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 1 + constructor() - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 3, empty + ExplicitSimpleImportingScope, index = 3 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 4 + packages: 6 + META-INF + java + javax + kotlin + org + sun classifiers: 1 class Context callables: 1 context(Context) fun test() + constructors: 0 DefaultSimpleImportingScope, index = 5 DefaultSimpleImportingScope, index = 6 - ExplicitStarImportingScope, index = 7, empty + ExplicitStarImportingScope, index = 7 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 8 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.txt index 2bf0103a575..b31366b8b15 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/contextReceiver.txt @@ -7,9 +7,14 @@ implicit receivers: owner symbol: KtFirFunctionSymbol scopes: - LocalScope, index = 0, empty + LocalScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 1 + packages: 0 classifiers: 0 callables: 4 KtFunctionSymbol: @@ -141,12 +146,58 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: Context + contextReceivers: [] + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE_MEMBER_GENERATED + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: Context + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 3, empty + ExplicitSimpleImportingScope, index = 3 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 4 + packages: 6 + KtPackageSymbol: + fqName: META-INF + origin: SOURCE + KtPackageSymbol: + fqName: java + origin: SOURCE + KtPackageSymbol: + fqName: javax + origin: SOURCE + KtPackageSymbol: + fqName: kotlin + origin: SOURCE + KtPackageSymbol: + fqName: org + origin: SOURCE + KtPackageSymbol: + fqName: sun + origin: SOURCE classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -206,12 +257,17 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 DefaultSimpleImportingScope, index = 5 DefaultSimpleImportingScope, index = 6 - ExplicitStarImportingScope, index = 7, empty + ExplicitStarImportingScope, index = 7 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 8 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt index 5fd76d7a0f3..eb6d23f19aa 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt @@ -7,11 +7,20 @@ implicit receivers: owner symbol: KtFirNamedClassOrObjectSymbol scopes: - LocalScope, index = 0, empty + LocalScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 2 + packages: 0 classifiers: 1 companion object callables: 11 @@ -26,39 +35,63 @@ scopes: val ordinal: kotlin.Int fun getDeclaringClass(): java.lang.Class? fun finalize() + constructors: 1 + constructor() StaticMemberScope, index = 3 + packages: 0 classifiers: 0 callables: 4 A fun values(): kotlin.Array fun valueOf(value: kotlin.String): E val entries: kotlin.enums.EnumEntries + constructors: 0 StaticMemberScope, index = 4 + packages: 0 classifiers: 1 companion object callables: 0 + constructors: 0 TypeScope, index = 5 + packages: 0 classifiers: 0 callables: 3 fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 0 - ExplicitSimpleImportingScope, index = 6, empty + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 7 + packages: 6 + META-INF + java + javax + kotlin + org + sun classifiers: 1 enum class E callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 8 DefaultSimpleImportingScope, index = 9 - ExplicitStarImportingScope, index = 10, empty + ExplicitStarImportingScope, index = 10 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 11 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt index df5f791baa3..21ee51c2c5f 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt @@ -13,11 +13,20 @@ implicit receivers: owner symbol: KtFirNamedClassOrObjectSymbol scopes: - LocalScope, index = 0, empty + LocalScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 2 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -455,8 +464,28 @@ scopes: typeParameters: [] valueParameters: [] visibility: ProtectedAndPackage + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: null + contextReceivers: [] + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE_MEMBER_GENERATED + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Private StaticMemberScope, index = 3 + packages: 0 classifiers: 0 callables: 4 KtEnumEntrySymbol: @@ -614,8 +643,10 @@ scopes: symbolKind: CLASS_MEMBER typeParameters: [] visibility: Public + constructors: 0 StaticMemberScope, index = 4 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -641,8 +672,10 @@ scopes: typeParameters: [] visibility: Public callables: 0 + constructors: 0 TypeScope, index = 5 + packages: 0 classifiers: 0 callables: 3 KtFunctionSymbol: @@ -747,10 +780,34 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 - ExplicitSimpleImportingScope, index = 6, empty + ExplicitSimpleImportingScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 7 + packages: 6 + KtPackageSymbol: + fqName: META-INF + origin: SOURCE + KtPackageSymbol: + fqName: java + origin: SOURCE + KtPackageSymbol: + fqName: javax + origin: SOURCE + KtPackageSymbol: + fqName: kotlin + origin: SOURCE + KtPackageSymbol: + fqName: org + origin: SOURCE + KtPackageSymbol: + fqName: sun + origin: SOURCE classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -781,12 +838,17 @@ scopes: typeParameters: [] visibility: Public callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 8 DefaultSimpleImportingScope, index = 9 - ExplicitStarImportingScope, index = 10, empty + ExplicitStarImportingScope, index = 10 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 11 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.pretty.txt index 2c79c73a1ec..b44a4bc901d 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.pretty.txt @@ -7,13 +7,26 @@ implicit receivers: owner symbol: KtFirAnonymousFunctionSymbol scopes: - TypeScope, index = 0, empty + TypeScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 3 + packages: 0 classifiers: 0 callables: 5 fun add(e: T) @@ -21,27 +34,56 @@ scopes: fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 0 - LocalScope, index = 4, empty + LocalScope, index = 4 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 5, empty + LocalScope, index = 5 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 6, empty + LocalScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 7, empty + ExplicitSimpleImportingScope, index = 7 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 8 + packages: 6 + META-INF + java + javax + kotlin + org + sun classifiers: 1 interface List callables: 2 fun buildList(f: List.() -> kotlin.Unit): List fun test() + constructors: 0 DefaultSimpleImportingScope, index = 9 DefaultSimpleImportingScope, index = 10 - ExplicitStarImportingScope, index = 11, empty + ExplicitStarImportingScope, index = 11 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 12 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.txt index e8316c8c62e..1e2eb271c52 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/errorType.txt @@ -16,13 +16,26 @@ implicit receivers: owner symbol: KtFirAnonymousFunctionSymbol scopes: - TypeScope, index = 0, empty + TypeScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 3 + packages: 0 classifiers: 0 callables: 5 KtFunctionSymbol: @@ -221,16 +234,52 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 - LocalScope, index = 4, empty + LocalScope, index = 4 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 5, empty + LocalScope, index = 5 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 6, empty + LocalScope, index = 6 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 7, empty + ExplicitSimpleImportingScope, index = 7 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 8 + packages: 6 + KtPackageSymbol: + fqName: META-INF + origin: SOURCE + KtPackageSymbol: + fqName: java + origin: SOURCE + KtPackageSymbol: + fqName: javax + origin: SOURCE + KtPackageSymbol: + fqName: kotlin + origin: SOURCE + KtPackageSymbol: + fqName: org + origin: SOURCE + KtPackageSymbol: + fqName: sun + origin: SOURCE classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -352,12 +401,17 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 DefaultSimpleImportingScope, index = 9 DefaultSimpleImportingScope, index = 10 - ExplicitStarImportingScope, index = 11, empty + ExplicitStarImportingScope, index = 11 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 12 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.pretty.txt index 8b0d03e6310..4e54d21bebf 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.pretty.txt @@ -5,13 +5,20 @@ implicit receivers: scopes: LocalScope, index = 0 + packages: 0 classifiers: 0 callables: 1 val localInX: kotlin.Int + constructors: 0 - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 2 + packages: 0 classifiers: 0 callables: 5 val propertyInY: kotlin.Int @@ -19,27 +26,51 @@ scopes: fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 1 + constructor() LocalScope, index = 3 + packages: 0 classifiers: 1 class Y callables: 1 val localInZ: kotlin.Int + constructors: 0 - LocalScope, index = 4, empty + LocalScope, index = 4 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 5, empty + ExplicitSimpleImportingScope, index = 5 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 6 + packages: 6 + META-INF + java + javax + kotlin + org + sun classifiers: 0 callables: 1 fun z() + constructors: 0 DefaultSimpleImportingScope, index = 7 DefaultSimpleImportingScope, index = 8 - ExplicitStarImportingScope, index = 9, empty + ExplicitStarImportingScope, index = 9 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 10 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.txt index 39bafb48595..01cc8489343 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/localTypeScope.txt @@ -8,6 +8,7 @@ implicit receivers: scopes: LocalScope, index = 0 + packages: 0 classifiers: 0 callables: 1 KtLocalVariableSymbol: @@ -25,10 +26,16 @@ scopes: type: kotlin/Int symbolKind: LOCAL typeParameters: [] + constructors: 0 - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 2 + packages: 0 classifiers: 0 callables: 5 KtKotlinPropertySymbol: @@ -224,8 +231,28 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: null + contextReceivers: [] + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE_MEMBER_GENERATED + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: Y + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public LocalScope, index = 3 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -266,12 +293,40 @@ scopes: type: kotlin/Int symbolKind: LOCAL typeParameters: [] + constructors: 0 - LocalScope, index = 4, empty + LocalScope, index = 4 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 5, empty + ExplicitSimpleImportingScope, index = 5 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 6 + packages: 6 + KtPackageSymbol: + fqName: META-INF + origin: SOURCE + KtPackageSymbol: + fqName: java + origin: SOURCE + KtPackageSymbol: + fqName: javax + origin: SOURCE + KtPackageSymbol: + fqName: kotlin + origin: SOURCE + KtPackageSymbol: + fqName: org + origin: SOURCE + KtPackageSymbol: + fqName: sun + origin: SOURCE classifiers: 0 callables: 1 KtFunctionSymbol: @@ -301,12 +356,17 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 DefaultSimpleImportingScope, index = 7 DefaultSimpleImportingScope, index = 8 - ExplicitStarImportingScope, index = 9, empty + ExplicitStarImportingScope, index = 9 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 10 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.pretty.txt index feb856631da..19a794919f9 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.pretty.txt @@ -11,54 +11,83 @@ implicit receivers: scopes: TypeScope, index = 0 + packages: 0 classifiers: 0 callables: 4 fun memberInA() fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 1 + constructor() - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 3 + packages: 0 classifiers: 0 callables: 4 fun memberInB() fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 1 + constructor() - LocalScope, index = 4, empty + LocalScope, index = 4 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 LocalScope, index = 5 + packages: 0 classifiers: 0 callables: 1 val localVarA: kotlin.Int + constructors: 0 LocalScope, index = 6 + packages: 0 classifiers: 0 callables: 1 lambdaArg: kotlin.String + constructors: 0 LocalScope, index = 7 + packages: 0 classifiers: 0 callables: 2 val localVarB: kotlin.Int fun localFunB() + constructors: 0 LocalScope, index = 8 + packages: 0 classifiers: 0 callables: 1 param: kotlin.String? + constructors: 0 TypeParameterScope, index = 9 + packages: 0 classifiers: 1 T callables: 0 + constructors: 0 TypeScope, index = 10 + packages: 0 classifiers: 2 class NestedInC class NestedInJavaClass @@ -67,20 +96,37 @@ scopes: fun equals(other: kotlin.Any?): kotlin.Boolean fun hashCode(): kotlin.Int fun toString(): kotlin.String + constructors: 1 + constructor() StaticMemberScope, index = 11 + packages: 0 classifiers: 1 class NestedInC callables: 0 + constructors: 0 StaticMemberScope, index = 12 + packages: 0 classifiers: 1 class NestedInJavaClass callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 13, empty + ExplicitSimpleImportingScope, index = 13 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 14 + packages: 6 + META-INF + java + javax + kotlin + org + sun classifiers: 3 class A class B @@ -90,15 +136,19 @@ scopes: fun withB(f: B.() -> kotlin.Unit) fun withJavaClass(f: JavaClass.() -> kotlin.Unit) fun topLevel(): kotlin.Int + constructors: 0 DefaultSimpleImportingScope, index = 15 DefaultSimpleImportingScope, index = 16 - ExplicitStarImportingScope, index = 17, empty + ExplicitStarImportingScope, index = 17 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 18 DefaultStarImportingScope, index = 19 - diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.txt index 2a8f93e4a9f..045a4230c34 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/simpleScopeContextForPosition.txt @@ -20,6 +20,7 @@ implicit receivers: scopes: TypeScope, index = 0 + packages: 0 classifiers: 0 callables: 4 KtFunctionSymbol: @@ -151,12 +152,40 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: A + contextReceivers: [] + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE_MEMBER_GENERATED + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: A + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public - LocalScope, index = 1, empty + LocalScope, index = 1 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 3 + packages: 0 classifiers: 0 callables: 4 KtFunctionSymbol: @@ -288,10 +317,34 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: B + contextReceivers: [] + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE_MEMBER_GENERATED + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: B + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public - LocalScope, index = 4, empty + LocalScope, index = 4 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 LocalScope, index = 5 + packages: 0 classifiers: 0 callables: 1 KtLocalVariableSymbol: @@ -309,8 +362,10 @@ scopes: type: kotlin/Int symbolKind: LOCAL typeParameters: [] + constructors: 0 LocalScope, index = 6 + packages: 0 classifiers: 0 callables: 1 KtValueParameterSymbol: @@ -333,8 +388,10 @@ scopes: type: kotlin/String symbolKind: LOCAL typeParameters: [] + constructors: 0 LocalScope, index = 7 + packages: 0 classifiers: 0 callables: 2 KtLocalVariableSymbol: @@ -379,8 +436,10 @@ scopes: typeParameters: [] valueParameters: [] visibility: Local + constructors: 0 LocalScope, index = 8 + packages: 0 classifiers: 0 callables: 1 KtValueParameterSymbol: @@ -403,8 +462,10 @@ scopes: type: kotlin/String? symbolKind: LOCAL typeParameters: [] + constructors: 0 TypeParameterScope, index = 9 + packages: 0 classifiers: 1 KtTypeParameterSymbol: annotationsList: [] @@ -415,8 +476,10 @@ scopes: upperBounds: [] variance: INVARIANT callables: 0 + constructors: 0 TypeScope, index = 10 + packages: 0 classifiers: 2 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -617,8 +680,28 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: C + contextReceivers: [] + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE_MEMBER_GENERATED + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: C + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public StaticMemberScope, index = 11 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -644,8 +727,10 @@ scopes: typeParameters: [] visibility: Public callables: 0 + constructors: 0 StaticMemberScope, index = 12 + packages: 0 classifiers: 1 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -671,10 +756,34 @@ scopes: typeParameters: [] visibility: PackageVisibility callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 13, empty + ExplicitSimpleImportingScope, index = 13 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 14 + packages: 6 + KtPackageSymbol: + fqName: META-INF + origin: SOURCE + KtPackageSymbol: + fqName: java + origin: SOURCE + KtPackageSymbol: + fqName: javax + origin: SOURCE + KtPackageSymbol: + fqName: kotlin + origin: SOURCE + KtPackageSymbol: + fqName: org + origin: SOURCE + KtPackageSymbol: + fqName: sun + origin: SOURCE classifiers: 3 KtNamedClassOrObjectSymbol: annotationsList: [] @@ -944,12 +1053,17 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 DefaultSimpleImportingScope, index = 15 DefaultSimpleImportingScope, index = 16 - ExplicitStarImportingScope, index = 17, empty + ExplicitStarImportingScope, index = 17 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 18 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.pretty.txt index 383ef0d4bf2..2adcb9134ba 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.pretty.txt @@ -4,9 +4,14 @@ implicit receivers: owner symbol: KtFirFunctionSymbol scopes: - LocalScope, index = 0, empty + LocalScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 1 + packages: 0 classifiers: 0 callables: 5 fun getValue(): kotlin.Int? @@ -15,21 +20,43 @@ scopes: fun toString(): kotlin.String val value: kotlin.Int? get() + constructors: 1 + constructor() - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 3, empty + ExplicitSimpleImportingScope, index = 3 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 4 + packages: 6 + META-INF + java + javax + kotlin + org + sun classifiers: 0 callables: 1 fun JavaClass.test() + constructors: 0 DefaultSimpleImportingScope, index = 5 DefaultSimpleImportingScope, index = 6 - ExplicitStarImportingScope, index = 7, empty + ExplicitStarImportingScope, index = 7 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 8 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.txt index 2a3e628525d..4132bf96135 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/syntheticPropertiesScope.txt @@ -7,9 +7,14 @@ implicit receivers: owner symbol: KtFirFunctionSymbol scopes: - LocalScope, index = 0, empty + LocalScope, index = 0 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 TypeScope, index = 1 + packages: 0 classifiers: 0 callables: 5 KtFunctionSymbol: @@ -188,12 +193,58 @@ scopes: symbolKind: CLASS_MEMBER typeParameters: [] visibility: Public + constructors: 1 + KtConstructorSymbol: + annotationsList: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: JavaClass + contextReceivers: [] + hasStableParameterNames: false + isExtension: false + isPrimary: true + origin: JAVA + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: JavaClass + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public - LocalScope, index = 2, empty + LocalScope, index = 2 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 - ExplicitSimpleImportingScope, index = 3, empty + ExplicitSimpleImportingScope, index = 3 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 PackageMemberScope, index = 4 + packages: 6 + KtPackageSymbol: + fqName: META-INF + origin: SOURCE + KtPackageSymbol: + fqName: java + origin: SOURCE + KtPackageSymbol: + fqName: javax + origin: SOURCE + KtPackageSymbol: + fqName: kotlin + origin: SOURCE + KtPackageSymbol: + fqName: org + origin: SOURCE + KtPackageSymbol: + fqName: sun + origin: SOURCE classifiers: 0 callables: 1 KtFunctionSymbol: @@ -230,12 +281,17 @@ scopes: typeParameters: [] valueParameters: [] visibility: Public + constructors: 0 DefaultSimpleImportingScope, index = 5 DefaultSimpleImportingScope, index = 6 - ExplicitStarImportingScope, index = 7, empty + ExplicitStarImportingScope, index = 7 + packages: 0 + classifiers: 0 + callables: 0 + constructors: 0 DefaultSimpleImportingScope, index = 8