From 07fb02c1f912775417def99aab69b68e10a8ab06 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Tue, 2 Nov 2021 01:57:57 +0900 Subject: [PATCH] [FIR IDE] Enable symbol-by-psi tests for AAPI/FE10 --- .../KtFe10SymbolByPsiTestGenerated.java | 206 ++++++++++ .../anonymousObject.descriptors.txt | 123 ++++++ .../symbolByPsi/delegateField.descriptors.txt | 225 ++++++++++ .../symbolByPsi/deprecated.descriptors.txt | 384 ++++++++++++++++++ .../enumValueMember.descriptors.txt | 150 +++++++ .../symbolByPsi/jvmName.descriptors.txt | 152 +++++++ .../memberProperties.descriptors.txt | 105 +++++ .../outerAndInnerClasses.descriptors.txt | 240 +++++++++++ .../topLevelProperties.descriptors.txt | 83 ++++ .../typeAnnotations.descriptors.txt | 237 +++++++++++ .../analysis/api/GenerateAnalysisApiTests.kt | 7 +- 11 files changed, 1909 insertions(+), 3 deletions(-) create mode 100644 analysis/analysis-api-fe10/tests/org/jetbrains/kotlin/analysis/api/descriptors/test/symbols/KtFe10SymbolByPsiTestGenerated.java create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/jvmName.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/outerAndInnerClasses.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/topLevelProperties.descriptors.txt create mode 100644 analysis/analysis-api/testData/symbols/symbolByPsi/typeAnnotations.descriptors.txt diff --git a/analysis/analysis-api-fe10/tests/org/jetbrains/kotlin/analysis/api/descriptors/test/symbols/KtFe10SymbolByPsiTestGenerated.java b/analysis/analysis-api-fe10/tests/org/jetbrains/kotlin/analysis/api/descriptors/test/symbols/KtFe10SymbolByPsiTestGenerated.java new file mode 100644 index 00000000000..5090093e781 --- /dev/null +++ b/analysis/analysis-api-fe10/tests/org/jetbrains/kotlin/analysis/api/descriptors/test/symbols/KtFe10SymbolByPsiTestGenerated.java @@ -0,0 +1,206 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.analysis.api.descriptors.test.symbols; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link GenerateNewCompilerTests.kt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("analysis/analysis-api/testData/symbols/symbolByPsi") +@TestDataPath("$PROJECT_ROOT") +public class KtFe10SymbolByPsiTestGenerated extends AbstractKtFe10SymbolByPsiTest { + @Test + public void testAllFilesPresentInSymbolByPsi() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/symbols/symbolByPsi"), Pattern.compile("^(.+)\\.kt$"), null, true); + } + + @Test + @TestMetadata("annotations.kt") + public void testAnnotations() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/annotations.kt"); + } + + @Test + @TestMetadata("anonymousObject.kt") + public void testAnonymousObject() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.kt"); + } + + @Test + @TestMetadata("backingField.kt") + public void testBackingField() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/backingField.kt"); + } + + @Test + @TestMetadata("class.kt") + public void testClass() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/class.kt"); + } + + @Test + @TestMetadata("classInitializer.kt") + public void testClassInitializer() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/classInitializer.kt"); + } + + @Test + @TestMetadata("classMembes.kt") + public void testClassMembes() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/classMembes.kt"); + } + + @Test + @TestMetadata("classPrimaryConstructor.kt") + public void testClassPrimaryConstructor() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/classPrimaryConstructor.kt"); + } + + @Test + @TestMetadata("classSecondaryConstructors.kt") + public void testClassSecondaryConstructors() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/classSecondaryConstructors.kt"); + } + + @Test + @TestMetadata("classWithTypeParams.kt") + public void testClassWithTypeParams() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/classWithTypeParams.kt"); + } + + @Test + @TestMetadata("delegateField.kt") + public void testDelegateField() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.kt"); + } + + @Test + @TestMetadata("deprecated.kt") + public void testDeprecated() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.kt"); + } + + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/enum.kt"); + } + + @Test + @TestMetadata("enumValueMember.kt") + public void testEnumValueMember() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.kt"); + } + + @Test + @TestMetadata("extensionFunction.kt") + public void testExtensionFunction() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/extensionFunction.kt"); + } + + @Test + @TestMetadata("forLoopVariable.kt") + public void testForLoopVariable() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/forLoopVariable.kt"); + } + + @Test + @TestMetadata("function.kt") + public void testFunction() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/function.kt"); + } + + @Test + @TestMetadata("functionWithTypeParams.kt") + public void testFunctionWithTypeParams() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/functionWithTypeParams.kt"); + } + + @Test + @TestMetadata("implicitConstructorDelegationCall.kt") + public void testImplicitConstructorDelegationCall() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/implicitConstructorDelegationCall.kt"); + } + + @Test + @TestMetadata("implicitReturn.kt") + public void testImplicitReturn() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/implicitReturn.kt"); + } + + @Test + @TestMetadata("implicitReturnInLambda.kt") + public void testImplicitReturnInLambda() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/implicitReturnInLambda.kt"); + } + + @Test + @TestMetadata("jvmName.kt") + public void testJvmName() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/jvmName.kt"); + } + + @Test + @TestMetadata("localDeclarations.kt") + public void testLocalDeclarations() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/localDeclarations.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/memberProperties.kt"); + } + + @Test + @TestMetadata("outerAndInnerClasses.kt") + public void testOuterAndInnerClasses() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/outerAndInnerClasses.kt"); + } + + @Test + @TestMetadata("topLevelFunctions.kt") + public void testTopLevelFunctions() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/topLevelFunctions.kt"); + } + + @Test + @TestMetadata("topLevelProperties.kt") + public void testTopLevelProperties() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/topLevelProperties.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/typeAlias.kt"); + } + + @Test + @TestMetadata("typeAnnotations.kt") + public void testTypeAnnotations() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/typeAnnotations.kt"); + } + + @Test + @TestMetadata("varargFunctions.kt") + public void testVarargFunctions() throws Exception { + runTest("analysis/analysis-api/testData/symbols/symbolByPsi/varargFunctions.kt"); + } +} diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt new file mode 100644 index 00000000000..56d56dbad2d --- /dev/null +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/anonymousObject.descriptors.txt @@ -0,0 +1,123 @@ +KtFunctionSymbol: + annotatedType: [] kotlin/Unit + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + dispatchType: null + hasStableParameterNames: true + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: true + isStatic: false + isSuspend: false + modality: FINAL + name: run + origin: SOURCE + receiverType: null + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + dispatchType: + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 123 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: data + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getData + javaSetterName: null + setterDeprecationStatus: null + +KtAnonymousObjectSymbol: + annotationClassIds: [] + annotations: [] + classIdIfNonLocal: null + classKind: ANONYMOUS_OBJECT + name: null + origin: SOURCE + superTypes: [ + [] java/lang/Runnable + ] + symbolKind: LOCAL + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] java/lang/Runnable + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /AnonymousContainer.anonymousObject + dispatchType: AnonymousContainer + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: KtUnsupportedConstantValue + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: anonymousObject + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getAnonymousObject + javaSetterName: null + setterDeprecationStatus: null + +KtNamedClassOrObjectSymbol: + annotationClassIds: [] + annotations: [] + classIdIfNonLocal: AnonymousContainer + classKind: CLASS + companionObject: null + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: AnonymousContainer + origin: SOURCE + superTypes: [ + [] kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + deprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt new file mode 100644 index 00000000000..36475fa5f5e --- /dev/null +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.descriptors.txt @@ -0,0 +1,225 @@ +KtValueParameterSymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + hasDefaultValue: false + isExtension: false + isVararg: false + name: x + origin: SOURCE + receiverType: null + symbolKind: LOCAL + deprecationStatus: null + +KtValueParameterSymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + hasDefaultValue: false + isExtension: false + isVararg: false + name: y + origin: SOURCE + receiverType: null + symbolKind: LOCAL + deprecationStatus: null + +KtValueParameterSymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + hasDefaultValue: false + isExtension: false + isVararg: false + name: z + origin: SOURCE + receiverType: null + symbolKind: LOCAL + deprecationStatus: null + +KtConstructorSymbol: + annotatedType: [] MyColor + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: MyColor + dispatchType: null + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE + receiverType: null + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [ + KtValueParameterSymbol(x) + KtValueParameterSymbol(y) + KtValueParameterSymbol(z) + ] + visibility: Public + deprecationStatus: null + +KtNamedClassOrObjectSymbol: + annotationClassIds: [] + annotations: [] + classIdIfNonLocal: MyColor + classKind: CLASS + companionObject: null + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: MyColor + origin: SOURCE + superTypes: [ + [] kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + deprecationStatus: null + +KtAnonymousFunctionSymbol: + annotatedType: [] MyColor + callableIdIfNonLocal: null + hasStableParameterNames: true + isExtension: false + origin: SOURCE + receiverType: null + symbolKind: LOCAL + valueParameters: [] + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] MyColor + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /Some.delegate + dispatchType: Some + getter: KtPropertyGetterSymbol() + hasBackingField: false + hasGetter: true + hasSetter: false + initializer: null + isConst: false + isDelegatedProperty: true + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: delegate + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getDelegate + javaSetterName: null + setterDeprecationStatus: null + +KtAnonymousFunctionSymbol: + annotatedType: [] MyColor + callableIdIfNonLocal: null + hasStableParameterNames: true + isExtension: false + origin: SOURCE + receiverType: null + symbolKind: LOCAL + valueParameters: [] + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Lazy + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /Some.lambda + dispatchType: Some + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: KtUnsupportedConstantValue + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: lambda + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getLambda + javaSetterName: null + setterDeprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] MyColor + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /Some.nonLazy + dispatchType: Some + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: KtUnsupportedConstantValue + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: nonLazy + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getNonLazy + javaSetterName: null + setterDeprecationStatus: null + +KtNamedClassOrObjectSymbol: + annotationClassIds: [] + annotations: [] + classIdIfNonLocal: Some + classKind: CLASS + companionObject: null + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: Some + origin: SOURCE + superTypes: [ + [] kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + deprecationStatus: null diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt new file mode 100644 index 00000000000..bd8130c6649 --- /dev/null +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/deprecated.descriptors.txt @@ -0,0 +1,384 @@ +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(message = don't use i) + psi: KtAnnotationEntry + ] + callableIdIfNonLocal: /i + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 1 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: i + origin: SOURCE + receiverType: null + setter: null + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use i) + getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use i) + javaGetterName: getI + javaSetterName: null + setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use i) + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /i2 + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 1 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: i2 + origin: SOURCE + receiverType: null + setter: null + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: null + getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i2) + javaGetterName: getI2 + javaSetterName: null + setterDeprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /i3 + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: true + initializer: 1 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: false + modality: FINAL + name: i3 + origin: SOURCE + receiverType: null + setter: KtPropertySetterSymbol() + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getI3 + javaSetterName: setI3 + setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i3) + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /i4 + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: true + initializer: 1 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: false + modality: FINAL + name: i4 + origin: SOURCE + receiverType: null + setter: KtPropertySetterSymbol() + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: null + getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i4) + javaGetterName: getI4 + javaSetterName: setI4 + setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use getter of i4) + +KtFunctionSymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(message = don't use f) + psi: KtAnnotationEntry + ] + callableIdIfNonLocal: /f + dispatchType: null + hasStableParameterNames: true + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: f + origin: SOURCE + receiverType: null + symbolKind: TOP_LEVEL + typeParameters: [] + valueParameters: [] + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use f) + +KtNamedClassOrObjectSymbol: + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(message = don't use MyClass) + psi: KtAnnotationEntry + ] + classIdIfNonLocal: MyClass + classKind: CLASS + companionObject: null + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: MyClass + origin: SOURCE + superTypes: [ + [] kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use MyClass) + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(message = don't use i2) + psi: KtAnnotationEntry + ] + callableIdIfNonLocal: /Foo.i2 + dispatchType: Foo + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 1 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: i2 + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use i2) + getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use i2) + javaGetterName: getI2 + javaSetterName: null + setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use i2) + +KtFunctionSymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(message = don't use f2) + psi: KtAnnotationEntry + ] + callableIdIfNonLocal: /Foo.f2 + dispatchType: Foo + hasStableParameterNames: true + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: f2 + origin: SOURCE + receiverType: null + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=true, message=don't use f2) + +KtNamedClassOrObjectSymbol: + annotationClassIds: [] + annotations: [] + classIdIfNonLocal: Foo + classKind: CLASS + companionObject: null + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: Foo + origin: SOURCE + superTypes: [ + [] kotlin/Any + ] + symbolKind: TOP_LEVEL + typeParameters: [] + visibility: Public + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(level = KtEnumEntryConstantValue(kotlin/DeprecationLevel.ERROR), message = don't use j) + psi: KtAnnotationEntry + ] + callableIdIfNonLocal: /j + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 2 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: j + origin: SOURCE + receiverType: null + setter: null + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=ERROR, propagatesToOverrides=true, message=don't use j) + getterDeprecationStatus: DeprecationInfo(deprecationLevel=ERROR, propagatesToOverrides=true, message=don't use j) + javaGetterName: getJ + javaSetterName: null + setterDeprecationStatus: DeprecationInfo(deprecationLevel=ERROR, propagatesToOverrides=true, message=don't use j) + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [ + kotlin/Deprecated + ] + annotations: [ + kotlin/Deprecated(level = KtEnumEntryConstantValue(kotlin/DeprecationLevel.HIDDEN), message = don't use j2) + psi: KtAnnotationEntry + ] + callableIdIfNonLocal: /j2 + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 2 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: j2 + origin: SOURCE + receiverType: null + setter: null + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=HIDDEN, propagatesToOverrides=true, message=don't use j2) + getterDeprecationStatus: DeprecationInfo(deprecationLevel=HIDDEN, propagatesToOverrides=true, message=don't use j2) + javaGetterName: getJ2 + javaSetterName: null + setterDeprecationStatus: DeprecationInfo(deprecationLevel=HIDDEN, propagatesToOverrides=true, message=don't use j2) + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/Int + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /j2 + dispatchType: null + getter: KtPropertyGetterSymbol() + hasBackingField: true + hasGetter: true + hasSetter: false + initializer: 2 + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: FINAL + name: j2 + origin: SOURCE + receiverType: null + setter: null + symbolKind: TOP_LEVEL + visibility: Public + deprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=false, message=null) + getterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=false, message=null) + javaGetterName: getJ2 + javaSetterName: null + setterDeprecationStatus: DeprecationInfo(deprecationLevel=WARNING, propagatesToOverrides=false, message=null) \ No newline at end of file diff --git a/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt b/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt new file mode 100644 index 00000000000..df2227506d3 --- /dev/null +++ b/analysis/analysis-api/testData/symbols/symbolByPsi/enumValueMember.descriptors.txt @@ -0,0 +1,150 @@ +KtValueParameterSymbol: + annotatedType: [] kotlin/String + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + hasDefaultValue: false + isExtension: false + isVararg: false + name: value + origin: SOURCE + receiverType: null + symbolKind: LOCAL + deprecationStatus: null + +KtConstructorSymbol: + annotatedType: [] Style + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + containingClassIdIfNonLocal: Style + dispatchType: null + hasStableParameterNames: true + isExtension: false + isPrimary: true + origin: SOURCE + receiverType: null + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [ + KtValueParameterSymbol(value) + ] + visibility: Private + deprecationStatus: null + +KtPropertyGetterSymbol: + annotatedType: [] kotlin/String + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + dispatchType: Style.SHEET + hasBody: true + hasStableParameterNames: true + isDefault: false + isExtension: false + isInline: false + isOverride: true + modality: FINAL + origin: SOURCE + receiverType: null + symbolKind: ACCESSOR + valueParameters: [] + visibility: Public + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/String + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: null + dispatchType: Style.SHEET + getter: KtPropertyGetterSymbol() + hasBackingField: false + hasGetter: true + hasSetter: false + initializer: null + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: true + isStatic: false + isVal: true + modality: FINAL + name: exitAnimation + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getExitAnimation + javaSetterName: null + setterDeprecationStatus: null + +KtEnumEntrySymbol: + annotatedType: [] Style + callableIdIfNonLocal: /Style.SHEET + containingEnumClassIdIfNonLocal: Style + isExtension: false + name: SHEET + origin: SOURCE + receiverType: null + symbolKind: CLASS_MEMBER + deprecationStatus: null + +KtKotlinPropertySymbol: + annotatedType: [] kotlin/String + annotationClassIds: [] + annotations: [] + callableIdIfNonLocal: /Style.exitAnimation + dispatchType: Style + getter: KtPropertyGetterSymbol() + hasBackingField: false + hasGetter: true + hasSetter: false + initializer: null + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: ABSTRACT + name: exitAnimation + origin: SOURCE + receiverType: null + setter: null + symbolKind: CLASS_MEMBER + visibility: Public + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getExitAnimation + javaSetterName: null + setterDeprecationStatus: null + +KtNamedClassOrObjectSymbol: + annotationClassIds: [] + annotations: [] + classIdIfNonLocal: Style + classKind: ENUM_CLASS + companionObject: null + isData: false + isExternal: false + isFun: false + isInline: false + isInner: false + modality: FINAL + name: Style + origin: SOURCE + superTypes: [ + [] kotlin/Enum