diff --git a/analysis/analysis-api-fe10/build.gradle.kts b/analysis/analysis-api-fe10/build.gradle.kts index 949c381ff3b..07a3989d1fc 100644 --- a/analysis/analysis-api-fe10/build.gradle.kts +++ b/analysis/analysis-api-fe10/build.gradle.kts @@ -40,9 +40,11 @@ sourceSets { tasks.withType> { kotlinOptions { freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" + freeCompilerArgs += "-Xcontext-receivers" } } + projectTest(jUnitMode = JUnitMode.JUnit5) { dependsOn(":dist") workingDir = rootDir diff --git a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KtFe10SymbolContainingDeclarationProvider.kt b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KtFe10SymbolContainingDeclarationProvider.kt index fbac54a8cb0..43dde887fef 100644 --- a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KtFe10SymbolContainingDeclarationProvider.kt +++ b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/components/KtFe10SymbolContainingDeclarationProvider.kt @@ -27,6 +27,7 @@ import org.jetbrains.kotlin.analysis.project.structure.getKtModule import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource import org.jetbrains.kotlin.platform.TargetPlatform +import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils import org.jetbrains.kotlin.resolve.PlatformDependentAnalyzerServices import org.jetbrains.kotlin.resolve.descriptorUtil.platform import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatformAnalyzerServices @@ -53,19 +54,15 @@ internal class KtFe10SymbolContainingDeclarationProvider( // TODO this is a dummy and incorrect implementation just to satisfy some tests override fun getContainingModule(symbol: KtSymbol): KtModule { - // Implicit lambda parameter doesn't have a source PSI. - if ((symbol as? KtValueParameterSymbol)?.isImplicitLambdaParameter == true) { - // Retrieve the module from its containing lambda instead. - getContainingDeclaration(symbol)?.let { parentLambdaSymbol -> - return getContainingModule(parentLambdaSymbol) - } - } - return symbol.psi?.getKtModule(analysisSession.analysisContext.resolveSession.project) + val psiForModule = symbol.getDescriptor()?.let { DescriptorToSourceUtils.getContainingFile(it) } + ?: symbol.psi + + return psiForModule?.getKtModule(analysisSession.analysisContext.resolveSession.project) ?: symbol.getDescriptor()?.getFakeContainingKtModule() - ?: TODO(symbol.toString()) + ?: TODO(symbol::class.java.name) } - private fun DeclarationDescriptor.getFakeContainingKtModule(): KtModule { + private fun DeclarationDescriptor.getFakeContainingKtModule(): KtModule? { return when (this) { is DescriptorWithContainerSource -> { val libraryPath = Paths.get((containerSource as JvmPackagePartSource).knownJvmBinaryClass?.containingLibrary!!) @@ -87,7 +84,7 @@ internal class KtFe10SymbolContainingDeclarationProvider( } } - else -> TODO(this.toString()) + else -> null } } } diff --git a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/KtFe10DescDefaultPropertySetterSymbol.kt b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/KtFe10DescDefaultPropertySetterSymbol.kt index 3533a8b713b..3adb9a56cb6 100644 --- a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/KtFe10DescDefaultPropertySetterSymbol.kt +++ b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/KtFe10DescDefaultPropertySetterSymbol.kt @@ -21,11 +21,12 @@ import org.jetbrains.kotlin.analysis.api.types.KtType import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion import org.jetbrains.kotlin.descriptors.Modality import org.jetbrains.kotlin.descriptors.PropertyDescriptor +import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor import org.jetbrains.kotlin.descriptors.Visibility import org.jetbrains.kotlin.name.CallableId import org.jetbrains.kotlin.name.Name -class KtFe10DescDefaultPropertySetterSymbol( +internal class KtFe10DescDefaultPropertySetterSymbol( private val propertyDescriptor: PropertyDescriptor, override val analysisContext: Fe10AnalysisContext ) : KtPropertySetterSymbol(), KtFe10Symbol { @@ -81,10 +82,13 @@ class KtFe10DescDefaultPropertySetterSymbol( } } - private class DefaultKtValueParameterSymbol( + class DefaultKtValueParameterSymbol( private val propertyDescriptor: PropertyDescriptor, override val analysisContext: Fe10AnalysisContext ) : KtValueParameterSymbol(), KtFe10Symbol { + val descriptor: ValueParameterDescriptor? + get() = propertyDescriptor.setter?.valueParameters?.singleOrNull() + override val hasDefaultValue: Boolean get() = withValidityAssertion { false } diff --git a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/Kt1DescUtils.kt b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/Kt1DescUtils.kt index 047ef28ddf7..239940d4f7b 100644 --- a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/Kt1DescUtils.kt +++ b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/descriptorBased/base/Kt1DescUtils.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.analysis.api.base.KtConstantValue import org.jetbrains.kotlin.analysis.api.base.KtContextReceiver import org.jetbrains.kotlin.analysis.api.components.KtDeclarationRendererOptions import org.jetbrains.kotlin.analysis.api.descriptors.Fe10AnalysisContext +import org.jetbrains.kotlin.analysis.api.descriptors.symbols.KtFe10FileSymbol import org.jetbrains.kotlin.analysis.api.descriptors.symbols.KtFe10PackageSymbol import org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.* import org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertyGetterSymbol @@ -135,6 +136,9 @@ internal fun KtSymbol.getDescriptor(): DeclarationDescriptor? { is KtFe10PsiDefaultSetterParameterSymbol -> descriptor is KtFe10PsiDefaultPropertySetterSymbol -> null is KtFe10DescDefaultPropertySetterSymbol -> null + is KtFe10FileSymbol -> null + is KtFe10DescDefaultPropertySetterSymbol.DefaultKtValueParameterSymbol -> descriptor + is KtFe10PsiDefaultPropertySetterSymbol.DefaultKtValueParameterSymbol -> descriptor else -> unexpectedElementError("KtSymbol", this) } } diff --git a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/psiBased/KtFe10PsiDefaultPropertySetterSymbol.kt b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/psiBased/KtFe10PsiDefaultPropertySetterSymbol.kt index 393f2e2bbb0..5af4db2cd93 100644 --- a/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/psiBased/KtFe10PsiDefaultPropertySetterSymbol.kt +++ b/analysis/analysis-api-fe10/src/org/jetbrains/kotlin/analysis/api/descriptors/symbols/psiBased/KtFe10PsiDefaultPropertySetterSymbol.kt @@ -104,9 +104,9 @@ internal class KtFe10PsiDefaultPropertySetterSymbol( return KtFe10NeverRestoringSymbolPointer() } - private class DefaultKtValueParameterSymbol( + class DefaultKtValueParameterSymbol( private val propertyPsi: KtProperty, - private val descriptor: ValueParameterDescriptor?, + val descriptor: ValueParameterDescriptor?, override val analysisContext: Fe10AnalysisContext ) : KtValueParameterSymbol(), KtFe10Symbol { override val hasDefaultValue: Boolean diff --git a/analysis/analysis-api/testData/scopes/delegatedMemberScope/propertyWithGetter.descriptors.txt b/analysis/analysis-api/testData/scopes/delegatedMemberScope/propertyWithGetter.descriptors.txt index 51e0d5ba655..16ce0b6605d 100644 --- a/analysis/analysis-api/testData/scopes/delegatedMemberScope/propertyWithGetter.descriptors.txt +++ b/analysis/analysis-api/testData/scopes/delegatedMemberScope/propertyWithGetter.descriptors.txt @@ -21,8 +21,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun ``(): kotlin.Int defined in I[PropertyGetterDescriptorImpl@5db84abe] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true diff --git a/analysis/analysis-api/testData/scopes/delegatedMemberScope/simple.descriptors.txt b/analysis/analysis-api/testData/scopes/delegatedMemberScope/simple.descriptors.txt index c8acbe99de4..77a0c61822e 100644 --- a/analysis/analysis-api/testData/scopes/delegatedMemberScope/simple.descriptors.txt +++ b/analysis/analysis-api/testData/scopes/delegatedMemberScope/simple.descriptors.txt @@ -21,8 +21,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun kotlin.Int.``(): kotlin.Unit defined in I[PropertyGetterDescriptorImpl@74fa42af] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true @@ -70,8 +69,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Unit symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Unit defined in I.``[ValueParameterDescriptorImpl@5e026e8c] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: kotlin/Int returnType: kotlin/Unit @@ -95,14 +93,12 @@ KtKotlinPropertySymbol: returnType: kotlin/Unit symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Unit defined in I.``[ValueParameterDescriptorImpl@5e026e8c] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun kotlin.Int.``(``: kotlin.Unit): kotlin.Unit defined in I[PropertySetterDescriptorImpl@14f129cc] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null symbolKind: CLASS_MEMBER typeParameters: [] @@ -192,8 +188,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun ``(): kotlin.Int defined in I[PropertyGetterDescriptorImpl@5c47271] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true @@ -247,8 +242,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun ``(): kotlin.Long defined in I[PropertyGetterDescriptorImpl@59243d9c] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true @@ -296,8 +290,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in I.``[ValueParameterDescriptorImpl@4751d8dd] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -321,14 +314,12 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in I.``[ValueParameterDescriptorImpl@4751d8dd] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun ``(``: kotlin.Long): kotlin.Unit defined in I[PropertySetterDescriptorImpl@421fc80] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null symbolKind: CLASS_MEMBER typeParameters: [] @@ -364,8 +355,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public open fun kotlin.Int.``(): kotlin.String defined in I[PropertyGetterDescriptorImpl@663e249d] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true diff --git a/analysis/analysis-api/testData/scopes/fileScopeTest/fileScope.descriptors.txt b/analysis/analysis-api/testData/scopes/fileScopeTest/fileScope.descriptors.txt index 41ead177f55..a0e4cab5037 100644 --- a/analysis/analysis-api/testData/scopes/fileScopeTest/fileScope.descriptors.txt +++ b/analysis/analysis-api/testData/scopes/fileScopeTest/fileScope.descriptors.txt @@ -206,8 +206,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Int defined in ``[ValueParameterDescriptorImpl@d6c9b60] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -231,8 +230,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Int defined in ``[ValueParameterDescriptorImpl@d6c9b60] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public @@ -318,8 +316,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in ``[ValueParameterDescriptorImpl@7b97af2c] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -343,8 +340,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in ``[ValueParameterDescriptorImpl@7b97af2c] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public @@ -430,8 +426,7 @@ KtKotlinPropertySymbol: returnType: kotlin/String symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.String defined in ``[ValueParameterDescriptorImpl@fff5304] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -455,8 +450,7 @@ KtKotlinPropertySymbol: returnType: kotlin/String symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.String defined in ``[ValueParameterDescriptorImpl@fff5304] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public @@ -542,8 +536,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in ``[ValueParameterDescriptorImpl@1a6bf275] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -567,8 +560,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in ``[ValueParameterDescriptorImpl@1a6bf275] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public @@ -657,8 +649,7 @@ KtKotlinPropertySymbol: returnType: kotlin/String symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.String defined in ``[ValueParameterDescriptorImpl@79cce906] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -682,8 +673,7 @@ KtKotlinPropertySymbol: returnType: kotlin/String symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.String defined in ``[ValueParameterDescriptorImpl@79cce906] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Private @@ -772,8 +762,7 @@ KtKotlinPropertySymbol: returnType: kotlin/String symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.String defined in ``[ValueParameterDescriptorImpl@11a17524] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -797,8 +786,7 @@ KtKotlinPropertySymbol: returnType: kotlin/String symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.String defined in ``[ValueParameterDescriptorImpl@11a17524] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Private @@ -1152,8 +1140,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in ``[ValueParameterDescriptorImpl@35483a2e] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null receiverType: null returnType: kotlin/Unit @@ -1177,8 +1164,7 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter ``: kotlin.Long defined in ``[ValueParameterDescriptorImpl@35483a2e] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null ] visibility: Public diff --git a/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithAnnotations.descriptors.txt b/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithAnnotations.descriptors.txt index 4aa58b7af32..0c30de8dc98 100644 --- a/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithAnnotations.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithAnnotations.descriptors.txt @@ -26,6 +26,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: true @@ -78,6 +80,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -103,8 +107,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertySetterSymbol + + deprecationStatus: null symbolKind: TOP_LEVEL typeParameters: [] visibility: Public diff --git a/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithDelegateAndAnnotations.descriptors.txt b/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithDelegateAndAnnotations.descriptors.txt index db0cc7c2799..1ca53e6ed01 100644 --- a/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithDelegateAndAnnotations.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/singleSymbolByPsi/propertyWithDelegateAndAnnotations.descriptors.txt @@ -25,8 +25,7 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public fun ``(): kotlin.Int defined in root package in file propertyWithDelegateAndAnnotations.kt[PropertyGetterDescriptorImpl@4e0346f] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/class.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/class.descriptors.txt index 94d5f3c035c..dad4ad0b236 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/class.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/class.descriptors.txt @@ -20,6 +20,6 @@ KtNamedClassOrObjectSymbol: KtTypeParameterSymbol(T) ] visibility: Public - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: deserialized class Lazy + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescNamedClassOrObjectSymbol deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/enumEntry.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/enumEntry.descriptors.txt index 79bd62e6464..bad2d300a0c 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/enumEntry.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/enumEntry.descriptors.txt @@ -10,6 +10,6 @@ KtEnumEntrySymbol: returnType: kotlin/LazyThreadSafetyMode symbolKind: CLASS_MEMBER typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: enum entry SYNCHRONIZED + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescEnumEntrySymbol deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/fileWalkDirectionEnum.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/fileWalkDirectionEnum.descriptors.txt index fcb56f24e35..fa529d8ad50 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/fileWalkDirectionEnum.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/fileWalkDirectionEnum.descriptors.txt @@ -39,7 +39,7 @@ KtFunctionSymbol: returnType: T symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter element: T defined in kotlin.collections.listOf[ValueParameterDescriptorImpl@54766ab0] + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescValueParameterSymbol deprecationStatus: null ] @@ -119,7 +119,7 @@ KtFunctionSymbol: returnType: T symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter vararg elements: T defined in kotlin.collections.listOf[ValueParameterDescriptorImpl@fc71ecb] + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescValueParameterSymbol deprecationStatus: null ] diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/iterator.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/iterator.descriptors.txt index 9fda4a20a3d..6d1b860def5 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/iterator.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/iterator.descriptors.txt @@ -20,6 +20,6 @@ KtNamedClassOrObjectSymbol: KtTypeParameterSymbol(T) ] visibility: Public - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: deserialized class Iterator + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescNamedClassOrObjectSymbol deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/listOf.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/listOf.descriptors.txt index 85da38e99ac..36c1d6ffcb3 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/listOf.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/listOf.descriptors.txt @@ -18,6 +18,6 @@ KtNamedClassOrObjectSymbol: symbolKind: TOP_LEVEL typeParameters: [] visibility: Public - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: deserialized class FileWalkDirection + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescNamedClassOrObjectSymbol deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunction.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunction.descriptors.txt index 092aa2983e2..1bc96e9406a 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunction.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunction.descriptors.txt @@ -37,7 +37,7 @@ KtFunctionSymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter index: kotlin.Int defined in kotlin.collections.List.get[ValueParameterDescriptorImpl@7609158f] + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescValueParameterSymbol deprecationStatus: null ] diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunctionWithOverloads.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunctionWithOverloads.descriptors.txt index a6120c6e696..1929df9799e 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunctionWithOverloads.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/memberFunctionWithOverloads.descriptors.txt @@ -65,7 +65,7 @@ KtFunctionSymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter index: kotlin.Int defined in kotlin.collections.List.listIterator[ValueParameterDescriptorImpl@30d92096] + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescValueParameterSymbol deprecationStatus: null ] diff --git a/analysis/analysis-api/testData/symbols/symbolByFqName/nestedClass.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByFqName/nestedClass.descriptors.txt index 3740fb0707a..8956d28f7f3 100644 --- a/analysis/analysis-api/testData/symbols/symbolByFqName/nestedClass.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByFqName/nestedClass.descriptors.txt @@ -21,6 +21,6 @@ KtNamedClassOrObjectSymbol: KtTypeParameterSymbol(V) ] visibility: Public - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: deserialized class MutableEntry + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescNamedClassOrObjectSymbol deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt index 43b71be7de7..509f1e4acf3 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt @@ -48,8 +48,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): kotlin.Int defined in AnonymousContainer.anonymousObject.``[PropertyGetterDescriptorImpl@424280a0] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true @@ -117,8 +116,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): AnonymousContainer - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): java.lang.Runnable defined in AnonymousContainer[PropertyGetterDescriptorImpl@413bc5ad] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.descriptors.txt new file mode 100644 index 00000000000..58395a00267 --- /dev/null +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.descriptors.txt @@ -0,0 +1,85 @@ +KtKotlinPropertySymbol: + annotationsList: [] + callableIdIfNonLocal: /A.i + contextReceivers: [] + getter: KtPropertyGetterSymbol: + annotationsList: [] + callableIdIfNonLocal: null + contextReceivers: [] + hasBody: false + hasStableParameterNames: true + isDefault: true + isExtension: false + isInline: false + isOverride: false + modality: FINAL + origin: SOURCE + receiverType: null + returnType: kotlin/Int + symbolKind: ACCESSOR + typeParameters: [] + valueParameters: [] + visibility: Public + getDispatchReceiver(): A + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: null + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: i + origin: SOURCE + receiverType: null + returnType: kotlin/Int + setter: null + symbolKind: CLASS_MEMBER + typeParameters: [] + visibility: Public + getDispatchReceiver(): A + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getI + javaSetterName: null + setterDeprecationStatus: null + +KtClassInitializerSymbol: + annotationsList: [] + origin: SOURCE + symbolKind: CLASS_MEMBER + typeParameters: [] + getContainingModule: Could not render due to org.jetbrains.kotlin.utils.KotlinExceptionWithAttachments: Unexpected KtSymbol KtFe10PsiClassInitializerSymbol + + deprecationStatus: null + +KtNamedClassOrObjectSymbol: + annotationsList: [] + classIdIfNonLocal: A + classKind: CLASS + companionObject: null + contextReceivers: [] + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: A + origin: SOURCE + superTypes: [ + kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.txt index acd36d0979a..3b1a9443df8 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.txt @@ -21,8 +21,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): kotlin.Int defined in A[PropertyGetterDescriptorImpl@30470bde] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/classMembes.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/classMembes.txt index 50482e5cf43..a8046358429 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/classMembes.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/classMembes.txt @@ -21,8 +21,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): kotlin.Int defined in A[PropertyGetterDescriptorImpl@5e912708] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt index 32d123bb935..d220c9dc612 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt @@ -135,8 +135,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): Some - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): MyColor defined in Some[PropertyGetterDescriptorImpl@71709753] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true @@ -205,8 +204,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): Some - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): kotlin.Lazy defined in Some[PropertyGetterDescriptorImpl@713cdbf7] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true @@ -260,8 +258,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): Some - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): MyColor defined in Some[PropertyGetterDescriptorImpl@270a35d9] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt index f672c4b634b..b8adccd8534 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt @@ -23,6 +23,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: false @@ -76,6 +78,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: false @@ -126,6 +130,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: true @@ -175,6 +181,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -197,8 +205,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertySetterSymbol + + deprecationStatus: null symbolKind: TOP_LEVEL typeParameters: [] visibility: Public @@ -234,6 +247,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: true @@ -283,6 +298,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -305,8 +322,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertySetterSymbol + + deprecationStatus: null symbolKind: TOP_LEVEL typeParameters: [] visibility: Public @@ -397,6 +419,9 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getDispatchReceiver(): Foo + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: false @@ -504,6 +529,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: false @@ -557,6 +584,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: false @@ -607,6 +636,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: false diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/dynamic.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/dynamic.txt index 80ed9a68dd3..8c5b420bd82 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/dynamic.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/dynamic.txt @@ -21,8 +21,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): Foo - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): dynamic defined in Foo[PropertyGetterDescriptorImpl@6ee51d31] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt index 338bca0ab71..a84583f06d6 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt @@ -128,8 +128,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): Style - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public abstract fun ``(): kotlin.String defined in Style[PropertyGetterDescriptorImpl@47e785cf] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/jvmField.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/jvmField.descriptors.txt index 3d41d8ad47c..5d75d73c82a 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/jvmField.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/jvmField.descriptors.txt @@ -20,6 +20,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: true @@ -66,6 +68,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -88,8 +92,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Long symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertySetterSymbol + + deprecationStatus: null symbolKind: TOP_LEVEL typeParameters: [] visibility: Public @@ -122,6 +131,8 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: true @@ -168,6 +179,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -190,8 +203,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertySetterSymbol + + deprecationStatus: null symbolKind: TOP_LEVEL typeParameters: [] visibility: Public diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/jvmName.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/jvmName.descriptors.txt index 153c357262d..d0653a7cba6 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/jvmName.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/jvmName.descriptors.txt @@ -23,6 +23,9 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getDispatchReceiver(): Foo + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: true hasGetter: true hasSetter: true @@ -72,6 +75,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -94,8 +99,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.psiBased.KtFe10PsiDefaultPropertySetterSymbol + + deprecationStatus: null symbolKind: CLASS_MEMBER typeParameters: [] visibility: Public @@ -132,6 +142,9 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public + getDispatchReceiver(): Foo + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null hasBackingField: false hasGetter: true hasSetter: true @@ -181,6 +194,8 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null receiverType: null returnType: kotlin/Unit symbolKind: ACCESSOR @@ -203,8 +218,13 @@ KtKotlinPropertySymbol: returnType: kotlin/Int symbolKind: LOCAL typeParameters: [] + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null ] visibility: Public + getDispatchReceiver(): Foo + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null symbolKind: CLASS_MEMBER typeParameters: [] visibility: Public diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.descriptors.txt new file mode 100644 index 00000000000..3c5592b2c0b --- /dev/null +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.descriptors.txt @@ -0,0 +1,130 @@ +KtKotlinPropertySymbol: + annotationsList: [] + callableIdIfNonLocal: /A.x + contextReceivers: [] + getter: KtPropertyGetterSymbol: + annotationsList: [] + callableIdIfNonLocal: null + contextReceivers: [] + hasBody: false + hasStableParameterNames: true + isDefault: true + isExtension: false + isInline: false + isOverride: false + modality: FINAL + origin: SOURCE + receiverType: null + returnType: kotlin/Int + symbolKind: ACCESSOR + typeParameters: [] + valueParameters: [] + visibility: Public + getDispatchReceiver(): A + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: KtConstantInitializerValue(10) + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: x + origin: SOURCE + receiverType: null + returnType: kotlin/Int + setter: null + symbolKind: CLASS_MEMBER + typeParameters: [] + visibility: Public + getDispatchReceiver(): A + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getX + javaSetterName: null + setterDeprecationStatus: null + +KtKotlinPropertySymbol: + annotationsList: [] + callableIdIfNonLocal: /A.y + contextReceivers: [] + getter: KtPropertyGetterSymbol: + annotationsList: [] + callableIdIfNonLocal: null + contextReceivers: [] + hasBody: true + hasStableParameterNames: true + isDefault: false + isExtension: false + isInline: false + isOverride: false + modality: FINAL + origin: SOURCE + receiverType: kotlin/Int + returnType: kotlin/Int + symbolKind: ACCESSOR + typeParameters: [] + valueParameters: [] + visibility: Public + getDispatchReceiver(): A + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + hasBackingField: false + hasGetter: true + hasSetter: false + initializer: null + isConst: false + isDelegatedProperty: false + isExtension: true + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: y + origin: SOURCE + receiverType: kotlin/Int + returnType: kotlin/Int + setter: null + symbolKind: CLASS_MEMBER + typeParameters: [] + visibility: Public + getDispatchReceiver(): A + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getY + javaSetterName: null + setterDeprecationStatus: null + +KtNamedClassOrObjectSymbol: + annotationsList: [] + classIdIfNonLocal: A + classKind: CLASS + companionObject: null + contextReceivers: [] + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: A + origin: SOURCE + superTypes: [ + kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.txt index feb47738cc2..a382266ecec 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.txt @@ -21,8 +21,7 @@ KtKotlinPropertySymbol: valueParameters: [] visibility: Public getDispatchReceiver(): A - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public final fun ``(): kotlin.Int defined in A[PropertyGetterDescriptorImpl@6819c9f0] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true @@ -75,7 +74,6 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public - getDispatchReceiver(): A getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: false diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/topLevelProperties.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/topLevelProperties.txt index 6ae5c605009..f7ed78eba4e 100644 --- a/analysis/analysis-api/testData/symbols/symbolByPsi/topLevelProperties.txt +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/topLevelProperties.txt @@ -20,8 +20,7 @@ KtKotlinPropertySymbol: typeParameters: [] valueParameters: [] visibility: Public - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: public fun ``(): kotlin.Int defined in root package in file topLevelProperties.kt[PropertyGetterDescriptorImpl@338f4432] - + getContainingModule: KtSourceModule "Sources of main" deprecationStatus: null hasBackingField: true hasGetter: true diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/accessorField.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByReference/accessorField.descriptors.txt deleted file mode 100644 index 17415252361..00000000000 --- a/analysis/analysis-api/testData/symbols/symbolByReference/accessorField.descriptors.txt +++ /dev/null @@ -1,15 +0,0 @@ -KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(/x) - receiverType: null - returnType: kotlin/Int - symbolKind: LOCAL - typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: var field: kotlin.Int defined in ``[SyntheticFieldDescriptor@660c5189] - - deprecationStatus: null \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByReference/samConstructor.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByReference/samConstructor.descriptors.txt index ace10da194e..e726796268f 100644 --- a/analysis/analysis-api/testData/symbols/symbolByReference/samConstructor.descriptors.txt +++ b/analysis/analysis-api/testData/symbols/symbolByReference/samConstructor.descriptors.txt @@ -28,7 +28,7 @@ KtSamConstructorSymbol: returnType: kotlin/Function0 symbolKind: LOCAL typeParameters: [] - getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: value-parameter function: () -> kotlin.Unit defined in java.lang.Runnable[ValueParameterDescriptorImpl@4dcd7cfa] + getContainingModule: Could not render due to kotlin.NotImplementedError: An operation is not implemented: org.jetbrains.kotlin.analysis.api.descriptors.symbols.descriptorBased.KtFe10DescValueParameterSymbol deprecationStatus: null ]