From b1b123efc0ee1fa2c900d33838312e9ba97f753d Mon Sep 17 00:00:00 2001 From: Dmitrii Gridin Date: Wed, 26 Jul 2023 21:30:55 +0200 Subject: [PATCH] [LL FIR] merge innerDeclarationsResolve testData to fileStructure ^KT-60728 --- .../annonymousClass.kt | 4 +- .../annonymousClass.txt | 0 ...aInsideSuperCallAndExplicitConstructor.txt | 18 + ...aInsideSuperCallAndImplicitConstructor.txt | 18 + ...nsideSuperCallFromSecondaryConstructor.txt | 25 ++ ...uperCallFromSingleSecondaryConstructor.txt | 18 + .../testdata/fileStructure/class.txt | 14 + .../testdata/fileStructure/class2.kt | 8 + .../class2.out_of_src_roots.txt} | 2 +- .../class.txt => fileStructure/class2.txt} | 2 +- .../fileStructure/classMemberProperty.txt | 22 ++ .../fileStructure/constructorParameter.txt | 11 + .../fileStructure/constructorParameter2.kt | 1 + .../constructorParameter2.txt} | 2 +- .../constructorParameterWithAnnotations.txt | 17 + .../testdata/fileStructure/constructors.txt | 14 + .../danglingAnnotationClassLevel.txt | 40 +++ .../danglingAnnotationTopLevel.txt | 2 + .../declarationsInPropertyInit.kt | 4 +- .../declarationsInPropertyInit.txt | 23 ++ .../testdata/fileStructure/enum.kt | 3 + .../enum.txt | 0 .../testdata/fileStructure/enumClass.txt | 29 ++ .../fileStructure/enumClassWithBody.txt | 41 +++ .../testdata/fileStructure/funWithoutTypes.kt | 3 + .../funWithoutTypes.txt | 0 .../fileStructure/functionValueParameter.kt | 9 + .../functionValueParameter.txt | 0 .../fileStructure/functionWithImplicitType.kt | 5 + ...ctionWithImplicitType.out_of_src_roots.txt | 0 .../functionWithImplicitType.txt | 0 .../testdata/fileStructure/functionalType.txt | 13 + .../testdata/fileStructure/initBlock.txt | 18 + .../testdata/fileStructure/lambda.kt | 6 +- .../testdata/fileStructure/lambda.txt | 13 + .../fileStructure/lambdaInImplicitFunBody.kt | 13 + .../lambdaInImplicitFunBody.txt | 0 .../lambdaInImplicitPropertyBody.kt | 14 + .../lambdaInImplicitPropertyBody.txt | 0 .../lambdasInWithBodyFunction.kt | 15 + .../lambdasInWithBodyFunction.txt | 0 .../testdata/fileStructure/localClass.txt | 26 ++ .../testdata/fileStructure/localClass2.kt | 5 + .../localClass2.txt} | 2 +- .../localDeclarationsInAccessor.txt | 67 ++++ .../testdata/fileStructure/localFun.txt | 18 + .../localFunctionWithImplicitType.txt | 7 + .../testdata/fileStructure/localProperty.txt | 31 ++ .../fileStructure/localUnitFunction.txt | 7 + .../fileStructure/memberFunctions.txt | 14 + .../fileStructure/memberProperties.txt | 14 + .../fileStructure/memberTypeAlias.txt | 9 + .../fileStructure/multipleTopLevelClasses.txt | 25 ++ ...ipleTopLevelFunctionsWithImplicitTypes.txt | 13 + .../multipleTopLevelUnitFunctions.txt | 13 + .../testdata/fileStructure/nestedClases.txt | 28 ++ .../fileStructure/nestedClasesWithFun.txt | 20 ++ .../testdata/fileStructure/nestedClasses.txt | 35 ++ .../fileStructure/propertyAccessors.txt | 22 ++ .../propertyWithGetterAndSetter.txt | 0 .../fileStructure/propertyWithSetter.kt | 14 + .../propertyWithSetter.txt | 0 .../qualifiedCallInsideSuperCall.txt | 105 ++++++ .../fileStructure/secondaryConstructor.txt | 17 + .../fileStructure/superCallAnnotation.txt | 19 ++ .../fileStructure/superCallAnnotation2.txt | 15 + .../testdata/fileStructure/superClassCall.txt | 64 ++++ .../testdata/fileStructure/superType.txt | 10 + .../topLevelExpressionBodyFunWithType.txt | 4 + .../topLevelExpressionBodyFunWithoutType.txt | 4 + .../fileStructure/topLevelFunWithType.txt | 5 + .../fileStructure/topLevelProperty.txt | 13 + .../fileStructure/topLevelUnitFun.txt | 4 + .../testdata/fileStructure/typeAlias.txt | 2 + .../testdata/fileStructure/withoutName.txt | 37 +++ .../innerDeclarationsResolve/class.kt | 8 - .../constructorParameter.kt | 1 - .../testdata/innerDeclarationsResolve/enum.kt | 3 - .../funWithoutTypes.kt | 3 - .../functionValueParameter.kt | 9 - .../functionWithImplicitType.kt | 5 - .../lambdaInImplicitFunBody.kt | 13 - .../lambdaInImplicitPropertyBody.kt | 14 - .../lambdasInWithBodyFunction.kt | 15 - .../innerDeclarationsResolve/localClass.kt | 5 - .../propertyWithGetterAndSetter.kt | 5 - .../propertyWithSetter.kt | 14 - ...entRootContextCollectionTestGenerated.java | 72 ++++ ...rSourceContextCollectionTestGenerated.java | 72 ++++ ...agnosticTraversalCounterTestGenerated.java | 72 ++++ ...ContentRootFileStructureTestGenerated.java | 72 ++++ .../SourceFileStructureTestGenerated.java | 72 ++++ ...DeclarationsResolvePhaseTestGenerated.java | 308 +++++++++++++++++- ...DeclarationsResolvePhaseTestGenerated.java | 308 +++++++++++++++++- .../tests/analysis/api/firLowLevel.kt | 4 +- 95 files changed, 2033 insertions(+), 138 deletions(-) rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/annonymousClass.kt (50%) rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/annonymousClass.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/class.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/class2.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve/class.out_of_src_roots.txt => fileStructure/class2.out_of_src_roots.txt} (96%) rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve/class.txt => fileStructure/class2.txt} (97%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve/constructorParameter.txt => fileStructure/constructorParameter2.txt} (88%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/constructors.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/enum.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/enum.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/enumClass.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/funWithoutTypes.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/functionValueParameter.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/functionWithImplicitType.out_of_src_roots.txt (100%) rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/functionWithImplicitType.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/functionalType.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/initBlock.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/lambda.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/lambdaInImplicitFunBody.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/lambdaInImplicitPropertyBody.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/lambdasInWithBodyFunction.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localClass.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve/localClass.txt => fileStructure/localClass2.txt} (89%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localFun.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localProperty.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/memberProperties.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/nestedClases.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.txt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/propertyWithGetterAndSetter.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt rename analysis/low-level-api-fir/testdata/{innerDeclarationsResolve => fileStructure}/propertyWithSetter.txt (100%) create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/superClassCall.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/superType.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/typeAlias.txt create mode 100644 analysis/low-level-api-fir/testdata/fileStructure/withoutName.txt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.kt delete mode 100644 analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.kt diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.kt b/analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt similarity index 50% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.kt rename to analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt index 7e5ec8b81b3..15b8eac3f0b 100644 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.kt +++ b/analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt @@ -1,5 +1,5 @@ -fun x() { +fun x() {/* ReanalyzableFunctionStructureElement */ val x = object: Any() { fun foo(){} } -} \ No newline at end of file +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.txt b/analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.txt rename to analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.txt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.txt new file mode 100644 index 00000000000..78c3d7feb8b --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.txt @@ -0,0 +1,18 @@ +FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructor.kt + public open [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|() -> kotlin/Unit|): R|B| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class A : R|B| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super(Int(1), [ResolvedTo(RAW_FIR)] fun (): R|kotlin/Unit| { + R|/foo|() + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.txt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.txt new file mode 100644 index 00000000000..cea40500def --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.txt @@ -0,0 +1,18 @@ +FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndImplicitConstructor.kt + public open [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|() -> kotlin/Unit|): R|B| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class A : R|B| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super(Int(1), [ResolvedTo(RAW_FIR)] fun (): R|kotlin/Unit| { + R|/foo|() + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.txt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.txt new file mode 100644 index 00000000000..e591f32cc7e --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.txt @@ -0,0 +1,25 @@ +FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt + public open [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|() -> kotlin/Unit|): R|A| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|A| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] i: R|kotlin/Int|): R|B| { + super([ResolvedTo(RAW_FIR)] fun (): R|kotlin/Unit| { + R|/foo|(R|/i|) + } + ) + } + + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] l: R|kotlin/Long|): R|B| { + super([ResolvedTo(RAW_FIR)] fun (): R|kotlin/Unit| { + R|/foo|(R|/l|) + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] any: R|kotlin/Any|): R|kotlin/Unit| { + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.txt b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.txt new file mode 100644 index 00000000000..6741f1f7346 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.txt @@ -0,0 +1,18 @@ +FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt + public open [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|() -> kotlin/Unit|): R|A| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|A| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] i: R|kotlin/Int|): R|B| { + super([ResolvedTo(RAW_FIR)] fun (): R|kotlin/Unit| { + R|/foo|(R|/i|) + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] any: R|kotlin/Any|): R|kotlin/Unit| { + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/class.txt b/analysis/low-level-api-fir/testdata/fileStructure/class.txt new file mode 100644 index 00000000000..00bf1bdee38 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/class.txt @@ -0,0 +1,14 @@ +FILE: [ResolvedTo(IMPORTS)] class.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| { + } + + public final [ResolvedTo(BODY_RESOLVE)] fun y(): R|kotlin/Int| { + ^y Int(10) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/class2.kt b/analysis/low-level-api-fir/testdata/fileStructure/class2.kt new file mode 100644 index 00000000000..c37daaecbf6 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/class2.kt @@ -0,0 +1,8 @@ +class B {/* NonReanalyzableClassDeclarationStructureElement */ + fun q(): C {/* ReanalyzableFunctionStructureElement */} + private val y = q()/* NonReanalyzableNonClassDeclarationStructureElement */ + + fun foo(a: A) = with(a) { + bar("a", y) + }/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.out_of_src_roots.txt b/analysis/low-level-api-fir/testdata/fileStructure/class2.out_of_src_roots.txt similarity index 96% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.out_of_src_roots.txt rename to analysis/low-level-api-fir/testdata/fileStructure/class2.out_of_src_roots.txt index 386b5ec7867..d91ee83ddf7 100644 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.out_of_src_roots.txt +++ b/analysis/low-level-api-fir/testdata/fileStructure/class2.out_of_src_roots.txt @@ -1,4 +1,4 @@ -FILE: [ResolvedTo(IMPORTS)] class.kt +FILE: [ResolvedTo(IMPORTS)] class2.kt public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { super() diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.txt b/analysis/low-level-api-fir/testdata/fileStructure/class2.txt similarity index 97% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.txt rename to analysis/low-level-api-fir/testdata/fileStructure/class2.txt index fcdfeb018ed..24b6ada3270 100644 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.txt +++ b/analysis/low-level-api-fir/testdata/fileStructure/class2.txt @@ -1,4 +1,4 @@ -FILE: [ResolvedTo(IMPORTS)] class.kt +FILE: [ResolvedTo(IMPORTS)] class2.kt public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { super() diff --git a/analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.txt b/analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.txt new file mode 100644 index 00000000000..348f2698f57 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.txt @@ -0,0 +1,22 @@ +FILE: [ResolvedTo(IMPORTS)] classMemberProperty.kt + public final [ResolvedTo(BODY_RESOLVE)] class X : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|X| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ this@R|/X|.F|/X.x| + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { + this@R|/X|.F|/X.x| = R|/value| + } + + public final [ResolvedTo(BODY_RESOLVE)] val y: R|kotlin/Int| = Int(42) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public final [ResolvedTo(BODY_RESOLVE)] var z: R|kotlin/Int| = Int(15) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.txt b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.txt new file mode 100644 index 00000000000..09cedb832df --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.txt @@ -0,0 +1,11 @@ +FILE: [ResolvedTo(IMPORTS)] constructorParameter.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|kotlin/Int|): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| = R|/x| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt new file mode 100644 index 00000000000..64a064fa847 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt @@ -0,0 +1 @@ +class A(val x: String)/* NonReanalyzableNonClassDeclarationStructureElement *//* NonReanalyzableClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.txt b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.txt similarity index 88% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.txt rename to analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.txt index c49c0dc5722..179ef8f3970 100644 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.txt +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.txt @@ -1,4 +1,4 @@ -FILE: [ResolvedTo(IMPORTS)] constructorParameter.kt +FILE: [ResolvedTo(IMPORTS)] constructorParameter2.kt public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|kotlin/String|): R|A| { super() diff --git a/analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.txt b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.txt new file mode 100644 index 00000000000..14e0cb2a9cf --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.txt @@ -0,0 +1,17 @@ +FILE: [ResolvedTo(IMPORTS)] constructorParameterWithAnnotations.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|kotlin/Int|): R|A| { + super() + } + + @PROPERTY:R|Ann|[Types]() field:@FIELD:R|Ann|[Types]() public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| = R|/x| + @PROPERTY_GETTER:R|Ann|[Types]() public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + @PROPERTY_SETTER:R|Ann|[Types]() public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] @SETTER_PARAMETER:R|Ann|[Types]() value: R|kotlin/Int|): R|kotlin/Unit| + + } + public final [ResolvedTo(BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Ann| { + super() + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/constructors.txt b/analysis/low-level-api-fir/testdata/fileStructure/constructors.txt new file mode 100644 index 00000000000..b039fa7e7c9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/constructors.txt @@ -0,0 +1,14 @@ +FILE: [ResolvedTo(IMPORTS)] constructors.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] a: R|kotlin/Int|): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val a: R|kotlin/Int| = R|/a| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + this(Int(1)) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.txt b/analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.txt new file mode 100644 index 00000000000..98cbe009150 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.txt @@ -0,0 +1,40 @@ +FILE: [ResolvedTo(IMPORTS)] danglingAnnotationClassLevel.kt + public final [ResolvedTo(BODY_RESOLVE)] class Foo : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Foo| { + super() + } + + @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() + } + public final [ResolvedTo(BODY_RESOLVE)] class Bar : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Bar| { + super() + } + + @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() + } + public final [ResolvedTo(BODY_RESOLVE)] class Outer : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] class Inner : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer.Inner| { + super() + } + + @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] class Local : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer.Local| { + super() + } + + @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.txt b/analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.txt new file mode 100644 index 00000000000..ea0316fc621 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.txt @@ -0,0 +1,2 @@ +FILE: [ResolvedTo(IMPORTS)] danglingAnnotationTopLevel.kt + @R|kotlin/Suppress|[Types](names = vararg(String())) @R|kotlin/annotation/MustBeDocumented|[Types]() diff --git a/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt b/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt index 0bc021ae25d..fab11fac7d5 100644 --- a/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt +++ b/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt @@ -1,11 +1,11 @@ class A {/* NonReanalyzableClassDeclarationStructureElement */ - val a = run { + val a = myRun { class X() val y = 10 }/* NonReanalyzableNonClassDeclarationStructureElement */ } -inline fun run(block: () -> R): R {/* ReanalyzableFunctionStructureElement */ +inline fun myRun(block: () -> R): R {/* ReanalyzableFunctionStructureElement */ return block() } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.txt b/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.txt new file mode 100644 index 00000000000..4888e5c0de1 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.txt @@ -0,0 +1,23 @@ +FILE: [ResolvedTo(IMPORTS)] declarationsInPropertyInit.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val a: R|kotlin/Unit| = R|/myRun|( = [ResolvedTo(BODY_RESOLVE)] myRun@fun (): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] class X : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.X| { + super() + } + + } + + [ResolvedTo(BODY_RESOLVE)] lval y: R|kotlin/Int| = Int(10) + } + ) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Unit| + + } + public final inline [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] R> myRun([ResolvedTo(BODY_RESOLVE)] block: R|() -> R|): R|R| { + ^myRun R|/block|.R|SubstitutionOverride|() + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/enum.kt b/analysis/low-level-api-fir/testdata/fileStructure/enum.kt new file mode 100644 index 00000000000..dfc6e261e41 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/enum.kt @@ -0,0 +1,3 @@ +enum class Enum(val x: Int)/* NonReanalyzableNonClassDeclarationStructureElement */ {/* NonReanalyzableClassDeclarationStructureElement */ + A(1),/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.txt b/analysis/low-level-api-fir/testdata/fileStructure/enum.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.txt rename to analysis/low-level-api-fir/testdata/fileStructure/enum.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/enumClass.txt b/analysis/low-level-api-fir/testdata/fileStructure/enumClass.txt new file mode 100644 index 00000000000..c8d5b6e5506 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/enumClass.txt @@ -0,0 +1,29 @@ +FILE: [ResolvedTo(IMPORTS)] enumClass.kt + public final [ResolvedTo(BODY_RESOLVE)] enum class A : R|kotlin/Enum| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super|>() + } + + public final static [ResolvedTo(BODY_RESOLVE)] enum entry X: R|A| + public final static [ResolvedTo(BODY_RESOLVE)] enum entry Y: R|A| + public final static [ResolvedTo(BODY_RESOLVE)] enum entry Z: R|A| + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + } + + public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int| = Int(10) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public final [ResolvedTo(BODY_RESOLVE)] fun bar(): R|kotlin/Int| { + ^bar Int(10) + } + + public final static [ResolvedTo(BODY_RESOLVE)] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] fun valueOf([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/String|): R|A| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/enums/EnumEntries| + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.txt b/analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.txt new file mode 100644 index 00000000000..25bd5e58abc --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.txt @@ -0,0 +1,41 @@ +FILE: [ResolvedTo(IMPORTS)] enumClassWithBody.kt + public final [ResolvedTo(BODY_RESOLVE)] enum class A : R|kotlin/Enum| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super|>() + } + + public final static [ResolvedTo(BODY_RESOLVE)] enum entry X: R|A| = object : R|A| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun localInX(): R|kotlin/Int| { + ^localInX Int(1) + } + + } + + public final static [ResolvedTo(BODY_RESOLVE)] enum entry Y: R|A| = object : R|A| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|| { + super() + } + + public open override [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + } + + } + + public final static [ResolvedTo(BODY_RESOLVE)] enum entry Z: R|A| + public open [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] fun valueOf([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/String|): R|A| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/enums/EnumEntries| + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt b/analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt new file mode 100644 index 00000000000..56096c5b9ac --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt @@ -0,0 +1,3 @@ +fun main() {/* ReanalyzableFunctionStructureElement */ + +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.txt b/analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.txt rename to analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt b/analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt new file mode 100644 index 00000000000..f31b9fe02b0 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt @@ -0,0 +1,9 @@ +fun bar(a: Int, b: (Boolean) -> Unit) {/* ReanalyzableFunctionStructureElement */ + +} + +class A {/* NonReanalyzableClassDeclarationStructureElement */ + fun foo(x: String, y: () -> String) {/* ReanalyzableFunctionStructureElement */ + + } +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.txt b/analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.txt rename to analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt b/analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt new file mode 100644 index 00000000000..5d6cc0a7fac --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt @@ -0,0 +1,5 @@ +import java.util.Collections + +fun checkSubtype(t: T) = t/* NonReanalyzableNonClassDeclarationStructureElement */ + +val ab = checkSubtype?>(Collections.emptyList())/* NonReanalyzableNonClassDeclarationStructureElement */ diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.out_of_src_roots.txt b/analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.out_of_src_roots.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.out_of_src_roots.txt rename to analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.out_of_src_roots.txt diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.txt b/analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.txt rename to analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/functionalType.txt b/analysis/low-level-api-fir/testdata/fileStructure/functionalType.txt new file mode 100644 index 00000000000..8868592bec2 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/functionalType.txt @@ -0,0 +1,13 @@ +FILE: [ResolvedTo(IMPORTS)] functionalType.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|kotlin/Int| = Int(10), [ResolvedTo(BODY_RESOLVE)] b: R|kotlin/String|): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int| = R|/x| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public final [ResolvedTo(BODY_RESOLVE)] val b: R|kotlin/String| = R|/b| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/initBlock.txt b/analysis/low-level-api-fir/testdata/fileStructure/initBlock.txt new file mode 100644 index 00000000000..0b2b87fe578 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/initBlock.txt @@ -0,0 +1,18 @@ +FILE: [ResolvedTo(IMPORTS)] initBlock.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + init { + [ResolvedTo(RAW_FIR)] lval x: R|kotlin/Int| = Int(10) + local final [ResolvedTo(RAW_FIR)] class B : R|kotlin/Any| { + public [ResolvedTo(RAW_FIR)] constructor(): R|A.B| { + super() + } + + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt b/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt index 8558d42cabe..8bbab97282a 100644 --- a/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt +++ b/analysis/low-level-api-fir/testdata/fileStructure/lambda.kt @@ -1,4 +1,4 @@ -val x = run { +val x = myRun { val inLambda = 10 println(inLambda) inLambda @@ -7,3 +7,7 @@ val x = run { fun println(any: Any) {/* ReanalyzableFunctionStructureElement */ } + +inline fun myRun(block: () -> R): R {/* ReanalyzableFunctionStructureElement */ + return block() +} diff --git a/analysis/low-level-api-fir/testdata/fileStructure/lambda.txt b/analysis/low-level-api-fir/testdata/fileStructure/lambda.txt new file mode 100644 index 00000000000..fe8f2992a1f --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/lambda.txt @@ -0,0 +1,13 @@ +FILE: [ResolvedTo(IMPORTS)] lambda.kt + public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int| = R|/myRun|( = [ResolvedTo(BODY_RESOLVE)] myRun@fun (): R|kotlin/Int| { + [ResolvedTo(BODY_RESOLVE)] lval inLambda: R|kotlin/Int| = Int(10) + R|/println|(R|/inLambda|) + ^ R|/inLambda| + } + ) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(BODY_RESOLVE)] fun println([ResolvedTo(BODY_RESOLVE)] any: R|kotlin/Any|): R|kotlin/Unit| { + } + public final inline [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] R> myRun([ResolvedTo(BODY_RESOLVE)] block: R|() -> R|): R|R| { + ^myRun R|/block|.R|SubstitutionOverride|() + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt b/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt new file mode 100644 index 00000000000..d3783f7dbd6 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt @@ -0,0 +1,13 @@ +inline fun with(receiver: T, block: T.() -> R): R {/* ReanalyzableFunctionStructureElement */ + return receiver.block() +} + +inline fun T.let(block: (T) -> R): R {/* ReanalyzableFunctionStructureElement */ + return block(this) +} + +class B {/* NonReanalyzableClassDeclarationStructureElement */ + fun foo(a: Int) = with(a) { + toString().let { it } + }/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.txt b/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.txt rename to analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt b/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt new file mode 100644 index 00000000000..7f4f3ada3fd --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt @@ -0,0 +1,14 @@ +inline fun with(receiver: T, block: T.() -> R): R {/* ReanalyzableFunctionStructureElement */ + return receiver.block() +} + +inline fun T.let(block: (T) -> R): R {/* ReanalyzableFunctionStructureElement */ + return block(this) +} + +class B {/* NonReanalyzableClassDeclarationStructureElement */ + val a: Int = 10/* NonReanalyzableNonClassDeclarationStructureElement */ + val x = with(a) { + toString().let { it } + }/* NonReanalyzableNonClassDeclarationStructureElement */ +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.txt b/analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.txt rename to analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt b/analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt new file mode 100644 index 00000000000..6348aa7df74 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt @@ -0,0 +1,15 @@ +inline fun with(receiver: T, block: T.() -> R): R {/* ReanalyzableFunctionStructureElement */ + return receiver.block() +} + +inline fun T.let(block: (T) -> R): R {/* ReanalyzableFunctionStructureElement */ + return block(this) +} + +class A {/* NonReanalyzableClassDeclarationStructureElement */ + fun foo() {/* ReanalyzableFunctionStructureElement */ + val a = with(1) { + this.let { it } + }.let { 2 } + } +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.txt b/analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.txt rename to analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localClass.txt b/analysis/low-level-api-fir/testdata/fileStructure/localClass.txt new file mode 100644 index 00000000000..01e9f35c4eb --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localClass.txt @@ -0,0 +1,26 @@ +FILE: [ResolvedTo(IMPORTS)] localClass.kt + public final [ResolvedTo(BODY_RESOLVE)] fun a(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] class X : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|X| { + super() + } + + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class Y : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Y| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun b(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] class Z : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Y.Z| { + super() + } + + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt b/analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt new file mode 100644 index 00000000000..a7d4df8e5e0 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt @@ -0,0 +1,5 @@ +fun x() {/* ReanalyzableFunctionStructureElement */ + class Local { + fun foo(){} + } +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.txt b/analysis/low-level-api-fir/testdata/fileStructure/localClass2.txt similarity index 89% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.txt rename to analysis/low-level-api-fir/testdata/fileStructure/localClass2.txt index 167399870df..3e46253bf8b 100644 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.txt +++ b/analysis/low-level-api-fir/testdata/fileStructure/localClass2.txt @@ -1,4 +1,4 @@ -FILE: [ResolvedTo(IMPORTS)] localClass.kt +FILE: [ResolvedTo(IMPORTS)] localClass2.kt public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| { local final [ResolvedTo(BODY_RESOLVE)] class Local : R|kotlin/Any| { public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Local| { diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.txt b/analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.txt new file mode 100644 index 00000000000..9589c534edb --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.txt @@ -0,0 +1,67 @@ +FILE: [ResolvedTo(IMPORTS)] localDeclarationsInAccessor.kt + public final [ResolvedTo(BODY_RESOLVE)] class Outer : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val i: R|kotlin/Int| = Int(1) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + local final [ResolvedTo(BODY_RESOLVE)] class Inner : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Outer.Inner| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] var i: R|kotlin/Int| = Int(2) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + { + [ResolvedTo(BODY_RESOLVE)] lval : R|kotlin/Int| = this@R|/Outer.Inner|.F|/i| + this@R|/Outer.Inner|.F|/i| = R|/|.R|kotlin/Int.inc|() + R|/| + } + + ^ this@R|/Outer.Inner|.F|/i| + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| + + public final [ResolvedTo(BODY_RESOLVE)] val j: R|kotlin/Int| = Int(3) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + this@R|/Outer.Inner|.F|/j| = Int(42) + ^ this@R|/Outer.Inner|.F|/j| + } + + public final [ResolvedTo(BODY_RESOLVE)] fun innerMember(): R|kotlin/Unit| { + { + [ResolvedTo(BODY_RESOLVE)] lval : R|kotlin/Int| = this@R|/Outer|.F|/Outer.i| + this@R|/Outer|.F|/Outer.i| = R|/|.R|kotlin/Int.inc|() + R|/| + } + + } + + } + + ^ this@R|/Outer|.F|/Outer.i| + } + + public final [ResolvedTo(BODY_RESOLVE)] val j: R|kotlin/Int| = Int(4) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + local final [ResolvedTo(BODY_RESOLVE)] fun local(): R|kotlin/Unit| { + { + [ResolvedTo(BODY_RESOLVE)] lval : R|kotlin/Int| = this@R|/Outer|.F|/Outer.j| + this@R|/Outer|.F|/Outer.j| = R|/|.R|kotlin/Int.inc|() + R|/| + } + + { + [ResolvedTo(BODY_RESOLVE)] lval : R|kotlin/Int| = this@R|/Outer|.F|/Outer.j| + this@R|/Outer|.F|/Outer.j| = R|/|.R|kotlin/Int.inc|() + R|/| + } + + } + + R|/local|() + ^ this@R|/Outer|.F|/Outer.j| + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localFun.txt b/analysis/low-level-api-fir/testdata/fileStructure/localFun.txt new file mode 100644 index 00000000000..af47eaffae3 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localFun.txt @@ -0,0 +1,18 @@ +FILE: [ResolvedTo(IMPORTS)] localFun.kt + public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] fun y(): R|kotlin/Unit| { + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun z(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] fun q(): R|kotlin/Unit| { + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.txt b/analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.txt new file mode 100644 index 00000000000..07406e4dfe2 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.txt @@ -0,0 +1,7 @@ +FILE: [ResolvedTo(IMPORTS)] localFunctionWithImplicitType.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] fun local(): R|kotlin/Int| { + ^local Int(0) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localProperty.txt b/analysis/low-level-api-fir/testdata/fileStructure/localProperty.txt new file mode 100644 index 00000000000..945fd2f6d1d --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localProperty.txt @@ -0,0 +1,31 @@ +FILE: [ResolvedTo(IMPORTS)] localProperty.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + [ResolvedTo(BODY_RESOLVE)] lvar x: R|kotlin/Int| + } + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun q(): R|kotlin/Unit| { + [ResolvedTo(BODY_RESOLVE)] lval y: R|kotlin/Int| = Int(42) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] class C : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B.C| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun u(): R|kotlin/Unit| { + [ResolvedTo(BODY_RESOLVE)] lvar z: R|kotlin/Int| = Int(15) + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.txt b/analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.txt new file mode 100644 index 00000000000..0a329aeaa02 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.txt @@ -0,0 +1,7 @@ +FILE: [ResolvedTo(IMPORTS)] localUnitFunction.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] fun local(): R|kotlin/Unit| { + #(String(local)) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.txt b/analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.txt new file mode 100644 index 00000000000..f7a1bcbd1a9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.txt @@ -0,0 +1,14 @@ +FILE: [ResolvedTo(IMPORTS)] memberFunctions.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo1(): R|kotlin/Int| { + ^foo1 Int(10) + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo2(): R|kotlin/Unit| { + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/memberProperties.txt b/analysis/low-level-api-fir/testdata/fileStructure/memberProperties.txt new file mode 100644 index 00000000000..065a2bc2dbc --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/memberProperties.txt @@ -0,0 +1,14 @@ +FILE: [ResolvedTo(IMPORTS)] memberProperties.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo1(): R|kotlin/Int| { + ^foo1 Int(10) + } + + public final [ResolvedTo(BODY_RESOLVE)] fun foo2(): R|kotlin/Unit| { + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.txt b/analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.txt new file mode 100644 index 00000000000..6fdf624e0ab --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.txt @@ -0,0 +1,9 @@ +FILE: [ResolvedTo(IMPORTS)] memberTypeAlias.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] typealias X = R|kotlin/Int| + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.txt b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.txt new file mode 100644 index 00000000000..818571154b1 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.txt @@ -0,0 +1,25 @@ +FILE: [ResolvedTo(IMPORTS)] multipleTopLevelClasses.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class C : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|C| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class D : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|D| { + super() + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.txt b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.txt new file mode 100644 index 00000000000..bfd47fcc66b --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.txt @@ -0,0 +1,13 @@ +FILE: [ResolvedTo(IMPORTS)] multipleTopLevelFunctionsWithImplicitTypes.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo1(): R|kotlin/Int| { + ^foo1 Int(1) + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo2(): R|kotlin/Int| { + ^foo2 Int(2) + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo3(): R|kotlin/Int| { + ^foo3 Int(3) + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo4(): R|kotlin/Int| { + ^foo4 Int(4) + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.txt b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.txt new file mode 100644 index 00000000000..9beb4f21ae9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.txt @@ -0,0 +1,13 @@ +FILE: [ResolvedTo(IMPORTS)] multipleTopLevelUnitFunctions.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo1(): R|kotlin/Unit| { + #(String(foo1)) + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo2(): R|kotlin/Unit| { + #(String(foo2)) + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo3(): R|kotlin/Unit| { + #(String(foo3)) + } + public final [ResolvedTo(BODY_RESOLVE)] fun foo4(): R|kotlin/Unit| { + #(String(foo4)) + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/nestedClases.txt b/analysis/low-level-api-fir/testdata/fileStructure/nestedClases.txt new file mode 100644 index 00000000000..85e8e645551 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/nestedClases.txt @@ -0,0 +1,28 @@ +FILE: [ResolvedTo(IMPORTS)] nestedClases.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.B| { + super() + } + + } + + public final [ResolvedTo(BODY_RESOLVE)] object C : R|kotlin/Any| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.C| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] class D : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.C.D| { + super() + } + + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.txt b/analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.txt new file mode 100644 index 00000000000..62c1c36b935 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.txt @@ -0,0 +1,20 @@ +FILE: [ResolvedTo(IMPORTS)] nestedClasesWithFun.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun y(): R|kotlin/Unit| { + } + + public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.B| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| { + } + + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.txt b/analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.txt new file mode 100644 index 00000000000..99d219fa0ce --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.txt @@ -0,0 +1,35 @@ +FILE: [ResolvedTo(IMPORTS)] nestedClasses.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] class B : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.B| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| { + } + + public final [ResolvedTo(BODY_RESOLVE)] class C : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.B.C| { + super() + } + + } + + } + + public final [ResolvedTo(BODY_RESOLVE)] class E : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A.E| { + super() + } + + } + + public final [ResolvedTo(BODY_RESOLVE)] fun y(): R|kotlin/Int| { + ^y Int(10) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.txt b/analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.txt new file mode 100644 index 00000000000..6aab0790fff --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.txt @@ -0,0 +1,22 @@ +FILE: [ResolvedTo(IMPORTS)] propertyAccessors.kt + public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| = Int(10) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ F|/x| + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { + F|/x| = R|/value| + } + public final [ResolvedTo(BODY_RESOLVE)] class X : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|X| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] var y: R|kotlin/Int| = Int(10) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ this@R|/X|.F|/X.y| + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { + this@R|/X|.F|/X.y| = R|/value| + } + + } diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.txt b/analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.txt rename to analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt b/analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt new file mode 100644 index 00000000000..ba64994f6bc --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt @@ -0,0 +1,14 @@ +abstract class Foo {/* NonReanalyzableClassDeclarationStructureElement */ + abstract var id: Int/* ReanalyzablePropertyStructureElement */ + protected set +} + +class Bar : Foo() {/* NonReanalyzableClassDeclarationStructureElement */ + override var id: Int = 1/* ReanalyzablePropertyStructureElement */ + public set +} + +fun test() {/* ReanalyzableFunctionStructureElement */ + val bar = Bar() + bar.id = 1 +} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.txt b/analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.txt similarity index 100% rename from analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.txt rename to analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.txt diff --git a/analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.txt b/analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.txt new file mode 100644 index 00000000000..e10bdec56b8 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.txt @@ -0,0 +1,105 @@ +FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCall.kt + public open [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] init: R|A.() -> kotlin/Unit|): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val prop: R|kotlin/String| = String() + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| + + } + public final [ResolvedTo(BODY_RESOLVE)] object B : R|A| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + ^ Unit + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] object C : R|A| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|C| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class D : R|A| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|D| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class E : R|A| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|E| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class F : R|A| { + public [ResolvedTo(BODY_RESOLVE)] error_constructor(): R|F| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|F| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class G : R|A| { + public [ResolvedTo(BODY_RESOLVE)] error_constructor(): R|G| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|G| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class H : R|A| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|H| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.txt b/analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.txt new file mode 100644 index 00000000000..86bad27f697 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.txt @@ -0,0 +1,17 @@ +FILE: [ResolvedTo(IMPORTS)] secondaryConstructor.kt + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] x: R|kotlin/Int| = Int(10), [ResolvedTo(BODY_RESOLVE)] b: R|kotlin/String|): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val x: R|kotlin/Int| = R|/x| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public final [ResolvedTo(BODY_RESOLVE)] val b: R|kotlin/String| = R|/b| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| + + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] i: R|kotlin/Int|): R|A| { + this(x = Int(1), b = R|/i|.R|kotlin/Int.toString|()) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.txt b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.txt new file mode 100644 index 00000000000..fb3eeddc45d --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.txt @@ -0,0 +1,19 @@ +FILE: [ResolvedTo(IMPORTS)] superCallAnnotation.kt + @R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(BODY_RESOLVE)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Anno| { + super() + } + + } + public open [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|@R|Anno|() A| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { + super() + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.txt b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.txt new file mode 100644 index 00000000000..82231c5b35c --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.txt @@ -0,0 +1,15 @@ +FILE: [ResolvedTo(IMPORTS)] superCallAnnotation2.kt + @R|kotlin/annotation/Target|[Types](allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final [ResolvedTo(BODY_RESOLVE)] annotation class Anno : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|Anno| { + super() + } + + } + public abstract [ResolvedTo(BODY_RESOLVE)] interface A : R|kotlin/Any| { + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|@R|Anno|() A| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { + super() + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superClassCall.txt b/analysis/low-level-api-fir/testdata/fileStructure/superClassCall.txt new file mode 100644 index 00000000000..d4c243d1c7c --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superClassCall.txt @@ -0,0 +1,64 @@ +FILE: [ResolvedTo(IMPORTS)] superClassCall.kt + public open [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor([ResolvedTo(BODY_RESOLVE)] init: R|A.() -> kotlin/Unit|): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] val prop: R|kotlin/String| = String() + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String| + + } + public final [ResolvedTo(BODY_RESOLVE)] class B : R|A| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|B| { + super() + } + + } + public final [ResolvedTo(BODY_RESOLVE)] object C : R|A| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|C| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.#.R|kotlin/toString|() + } + + } + ) + } + + } + public final [ResolvedTo(BODY_RESOLVE)] val f: R|A| = object : R|A| { + private [ResolvedTo(BODY_RESOLVE)] constructor(): R|| { + super([ResolvedTo(BODY_RESOLVE)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(BODY_RESOLVE)] fun bar(): R|kotlin/String| { + ^bar Q|B|.#.R|kotlin/toString|() + } + + } + ) + } + + } + + public [ResolvedTo(BODY_RESOLVE)] get(): R|A| + public final [ResolvedTo(BODY_RESOLVE)] class D : R|A| { + public [ResolvedTo(BODY_RESOLVE)] error_constructor(): R|D| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| { + ^foo Q|B|.#.R|kotlin/toString|() + } + + } + ) + } + + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|D| { + super([ResolvedTo(RAW_FIR)] fun R|A|.(): R|kotlin/Unit| { + local final [ResolvedTo(RAW_FIR)] fun boo(): R|kotlin/String| { + ^boo this@R|special/anonymous|.R|/A.prop|.R|kotlin/String.toString|() + } + + } + ) + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/superType.txt b/analysis/low-level-api-fir/testdata/fileStructure/superType.txt new file mode 100644 index 00000000000..a0ee4ab57ea --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/superType.txt @@ -0,0 +1,10 @@ +FILE: [ResolvedTo(IMPORTS)] superType.kt + public abstract [ResolvedTo(BODY_RESOLVE)] interface A<[ResolvedTo(BODY_RESOLVE)] T> : R|kotlin/Any| { + } + public final [ResolvedTo(BODY_RESOLVE)] typealias AS = R|A| + public final [ResolvedTo(BODY_RESOLVE)] class C : R|AS| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|C| { + super() + } + + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.txt b/analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.txt new file mode 100644 index 00000000000..349c4b333d5 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.txt @@ -0,0 +1,4 @@ +FILE: [ResolvedTo(IMPORTS)] topLevelExpressionBodyFunWithType.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Int| { + ^foo Int(42) + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.txt b/analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.txt new file mode 100644 index 00000000000..534c91a15ff --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.txt @@ -0,0 +1,4 @@ +FILE: [ResolvedTo(IMPORTS)] topLevelExpressionBodyFunWithoutType.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Int| { + ^foo Int(42) + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.txt b/analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.txt new file mode 100644 index 00000000000..e384adbeca9 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.txt @@ -0,0 +1,5 @@ +FILE: [ResolvedTo(IMPORTS)] topLevelFunWithType.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Int| { + #(String()) + ^foo Int(10) + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.txt b/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.txt new file mode 100644 index 00000000000..c05d5102038 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.txt @@ -0,0 +1,13 @@ +FILE: [ResolvedTo(IMPORTS)] topLevelProperty.kt + public final [ResolvedTo(BODY_RESOLVE)] var x: R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ F|/x| + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { + F|/x| = R|/value| + } + public final [ResolvedTo(BODY_RESOLVE)] val y: R|kotlin/Int| = Int(42) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(BODY_RESOLVE)] var z: R|kotlin/Int| = Int(15) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| diff --git a/analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.txt b/analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.txt new file mode 100644 index 00000000000..b56dd7c6cb0 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.txt @@ -0,0 +1,4 @@ +FILE: [ResolvedTo(IMPORTS)] topLevelUnitFun.kt + public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| { + #(String()) + } diff --git a/analysis/low-level-api-fir/testdata/fileStructure/typeAlias.txt b/analysis/low-level-api-fir/testdata/fileStructure/typeAlias.txt new file mode 100644 index 00000000000..b5056f280e1 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/typeAlias.txt @@ -0,0 +1,2 @@ +FILE: [ResolvedTo(IMPORTS)] typeAlias.kt + public final [ResolvedTo(BODY_RESOLVE)] typealias A = diff --git a/analysis/low-level-api-fir/testdata/fileStructure/withoutName.txt b/analysis/low-level-api-fir/testdata/fileStructure/withoutName.txt new file mode 100644 index 00000000000..98315156f47 --- /dev/null +++ b/analysis/low-level-api-fir/testdata/fileStructure/withoutName.txt @@ -0,0 +1,37 @@ +FILE: [ResolvedTo(IMPORTS)] withoutName.kt + public final [ResolvedTo(BODY_RESOLVE)] fun ([ResolvedTo(BODY_RESOLVE)] a: R|kotlin/Int| = Int(1)): R|kotlin/String| { + ^ String(str) + } + public final [ResolvedTo(BODY_RESOLVE)] fun (): R|kotlin/Unit| { + } + public final [ResolvedTo(BODY_RESOLVE)] val : R|kotlin/Int| = Int(4) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + public final [ResolvedTo(BODY_RESOLVE)] var : R|kotlin/Int| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| { + ^ Int(4) + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit| { + } + public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| { + public [ResolvedTo(BODY_RESOLVE)] constructor(): R|A| { + super() + } + + public final [ResolvedTo(BODY_RESOLVE)] fun ([ResolvedTo(BODY_RESOLVE)] a: R|kotlin/Int| = Int(1)): R|kotlin/String| { + ^ String(str) + } + + public final [ResolvedTo(BODY_RESOLVE)] fun (): R|kotlin/Unit| { + } + + public final [ResolvedTo(BODY_RESOLVE)] val : R|kotlin/Int| = Int(4) + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int| + + public final [ResolvedTo(BODY_RESOLVE)] var : R|kotlin/Boolean| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Boolean| { + ^ Boolean(true) + } + public [ResolvedTo(BODY_RESOLVE)] set([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/Boolean|): R|kotlin/Unit| { + } + + } diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.kt deleted file mode 100644 index 606ccd67dbf..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.kt +++ /dev/null @@ -1,8 +0,0 @@ -class B { - fun q(): C {} - private val y = q() - - fun foo(a: A) = with(a) { - bar("a", y) - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.kt deleted file mode 100644 index f88074aa4a2..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.kt +++ /dev/null @@ -1 +0,0 @@ -class A(val x: String) \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.kt deleted file mode 100644 index 76a0c2bdd60..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.kt +++ /dev/null @@ -1,3 +0,0 @@ -enum class Enum(val x: Int) { - A(1), -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.kt deleted file mode 100644 index f1eafa99a88..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.kt +++ /dev/null @@ -1,3 +0,0 @@ -fun main() { - -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.kt deleted file mode 100644 index 58184826c94..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.kt +++ /dev/null @@ -1,9 +0,0 @@ -fun bar(a: Int, b: (Boolean) -> Unit) { - -} - -class A { - fun foo(x: String, y: () -> String) { - - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.kt deleted file mode 100644 index e7a7f0c8db9..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.kt +++ /dev/null @@ -1,5 +0,0 @@ -import java.util.Collections - -fun checkSubtype(t: T) = t - -val ab = checkSubtype?>(Collections.emptyList()) diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.kt deleted file mode 100644 index f60c0378525..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.kt +++ /dev/null @@ -1,13 +0,0 @@ -inline fun with(receiver: T, block: T.() -> R): R { - return receiver.block() -} - -inline fun T.let(block: (T) -> R): R { - return block(this) -} - -class B { - fun foo(a: Int) = with(a) { - toString().let { it } - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.kt deleted file mode 100644 index bc562eec574..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.kt +++ /dev/null @@ -1,14 +0,0 @@ -inline fun with(receiver: T, block: T.() -> R): R { - return receiver.block() -} - -inline fun T.let(block: (T) -> R): R { - return block(this) -} - -class B { - val a: Int = 10 - val x = with(a) { - toString().let { it } - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.kt deleted file mode 100644 index 2fcba5316b3..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.kt +++ /dev/null @@ -1,15 +0,0 @@ -inline fun with(receiver: T, block: T.() -> R): R { - return receiver.block() -} - -inline fun T.let(block: (T) -> R): R { - return block(this) -} - -class A { - fun foo() { - val a = with(1) { - this.let { it } - }.let { 2 } - } -} diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.kt deleted file mode 100644 index a565210b59b..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.kt +++ /dev/null @@ -1,5 +0,0 @@ -fun x() { - class Local { - fun foo(){} - } -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.kt deleted file mode 100644 index e3481db3d06..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.kt +++ /dev/null @@ -1,5 +0,0 @@ -var withGetterAndSetter: Int = 42 - get() = field - set(value) { - field = value - } diff --git a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.kt b/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.kt deleted file mode 100644 index 91b1d6f5dc8..00000000000 --- a/analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.kt +++ /dev/null @@ -1,14 +0,0 @@ -abstract class Foo { - abstract var id: Int - protected set -} - -class Bar : Foo() { - override var id: Int = 1 - public set -} - -fun test() { - val bar = Bar() - bar.id = 1 -} \ No newline at end of file diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java index eed987cb9de..55965568936 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirOutOfContentRootContextCollectionTestGenerated.java @@ -24,6 +24,12 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("annonymousClass.kt") + public void testAnnonymousClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + @Test @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { @@ -54,6 +60,12 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); } + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + @Test @TestMetadata("classMemberProperty.kt") public void testClassMemberProperty() throws Exception { @@ -66,6 +78,12 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); } + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + @Test @TestMetadata("constructorParameterWithAnnotations.kt") public void testConstructorParameterWithAnnotations() throws Exception { @@ -96,6 +114,12 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + @Test @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { @@ -108,6 +132,24 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("funWithoutTypes.kt") + public void testFunWithoutTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); + } + + @Test + @TestMetadata("functionValueParameter.kt") + public void testFunctionValueParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); + } + + @Test + @TestMetadata("functionWithImplicitType.kt") + public void testFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + @Test @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { @@ -126,12 +168,36 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } + @Test + @TestMetadata("lambdaInImplicitFunBody.kt") + public void testLambdaInImplicitFunBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); + } + + @Test + @TestMetadata("lambdaInImplicitPropertyBody.kt") + public void testLambdaInImplicitPropertyBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); + } + + @Test + @TestMetadata("lambdasInWithBodyFunction.kt") + public void testLambdasInWithBodyFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + @Test @TestMetadata("localDeclarationsInAccessor.kt") public void testLocalDeclarationsInAccessor() throws Exception { @@ -228,6 +294,12 @@ public class FirOutOfContentRootContextCollectionTestGenerated extends AbstractF runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } + @Test + @TestMetadata("propertyWithSetter.kt") + public void testPropertyWithSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + @Test @TestMetadata("qualifiedCallInsideSuperCall.kt") public void testQualifiedCallInsideSuperCall() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java index 39895f8f46a..cec20446b0f 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/FirSourceContextCollectionTestGenerated.java @@ -24,6 +24,12 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("annonymousClass.kt") + public void testAnnonymousClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + @Test @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { @@ -54,6 +60,12 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); } + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + @Test @TestMetadata("classMemberProperty.kt") public void testClassMemberProperty() throws Exception { @@ -66,6 +78,12 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); } + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + @Test @TestMetadata("constructorParameterWithAnnotations.kt") public void testConstructorParameterWithAnnotations() throws Exception { @@ -96,6 +114,12 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + @Test @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { @@ -108,6 +132,24 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("funWithoutTypes.kt") + public void testFunWithoutTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); + } + + @Test + @TestMetadata("functionValueParameter.kt") + public void testFunctionValueParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); + } + + @Test + @TestMetadata("functionWithImplicitType.kt") + public void testFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + @Test @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { @@ -126,12 +168,36 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } + @Test + @TestMetadata("lambdaInImplicitFunBody.kt") + public void testLambdaInImplicitFunBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); + } + + @Test + @TestMetadata("lambdaInImplicitPropertyBody.kt") + public void testLambdaInImplicitPropertyBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); + } + + @Test + @TestMetadata("lambdasInWithBodyFunction.kt") + public void testLambdasInWithBodyFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + @Test @TestMetadata("localDeclarationsInAccessor.kt") public void testLocalDeclarationsInAccessor() throws Exception { @@ -228,6 +294,12 @@ public class FirSourceContextCollectionTestGenerated extends AbstractFirSourceCo runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } + @Test + @TestMetadata("propertyWithSetter.kt") + public void testPropertyWithSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + @Test @TestMetadata("qualifiedCallInsideSuperCall.kt") public void testQualifiedCallInsideSuperCall() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/SourceDiagnosticTraversalCounterTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/SourceDiagnosticTraversalCounterTestGenerated.java index e5ff9828093..f59728410b3 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/SourceDiagnosticTraversalCounterTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/SourceDiagnosticTraversalCounterTestGenerated.java @@ -24,6 +24,12 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("annonymousClass.kt") + public void testAnnonymousClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + @Test @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { @@ -54,6 +60,12 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); } + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + @Test @TestMetadata("classMemberProperty.kt") public void testClassMemberProperty() throws Exception { @@ -66,6 +78,12 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); } + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + @Test @TestMetadata("constructorParameterWithAnnotations.kt") public void testConstructorParameterWithAnnotations() throws Exception { @@ -96,6 +114,12 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + @Test @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { @@ -108,6 +132,24 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("funWithoutTypes.kt") + public void testFunWithoutTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); + } + + @Test + @TestMetadata("functionValueParameter.kt") + public void testFunctionValueParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); + } + + @Test + @TestMetadata("functionWithImplicitType.kt") + public void testFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + @Test @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { @@ -126,12 +168,36 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } + @Test + @TestMetadata("lambdaInImplicitFunBody.kt") + public void testLambdaInImplicitFunBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); + } + + @Test + @TestMetadata("lambdaInImplicitPropertyBody.kt") + public void testLambdaInImplicitPropertyBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); + } + + @Test + @TestMetadata("lambdasInWithBodyFunction.kt") + public void testLambdasInWithBodyFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + @Test @TestMetadata("localDeclarationsInAccessor.kt") public void testLocalDeclarationsInAccessor() throws Exception { @@ -228,6 +294,12 @@ public class SourceDiagnosticTraversalCounterTestGenerated extends AbstractSourc runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } + @Test + @TestMetadata("propertyWithSetter.kt") + public void testPropertyWithSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + @Test @TestMetadata("qualifiedCallInsideSuperCall.kt") public void testQualifiedCallInsideSuperCall() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java index e67611b0d3a..529d560849f 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/OutOfContentRootFileStructureTestGenerated.java @@ -24,6 +24,12 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("annonymousClass.kt") + public void testAnnonymousClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + @Test @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { @@ -54,6 +60,12 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); } + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + @Test @TestMetadata("classMemberProperty.kt") public void testClassMemberProperty() throws Exception { @@ -66,6 +78,12 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); } + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + @Test @TestMetadata("constructorParameterWithAnnotations.kt") public void testConstructorParameterWithAnnotations() throws Exception { @@ -96,6 +114,12 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + @Test @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { @@ -108,6 +132,24 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("funWithoutTypes.kt") + public void testFunWithoutTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); + } + + @Test + @TestMetadata("functionValueParameter.kt") + public void testFunctionValueParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); + } + + @Test + @TestMetadata("functionWithImplicitType.kt") + public void testFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + @Test @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { @@ -126,12 +168,36 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } + @Test + @TestMetadata("lambdaInImplicitFunBody.kt") + public void testLambdaInImplicitFunBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); + } + + @Test + @TestMetadata("lambdaInImplicitPropertyBody.kt") + public void testLambdaInImplicitPropertyBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); + } + + @Test + @TestMetadata("lambdasInWithBodyFunction.kt") + public void testLambdasInWithBodyFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + @Test @TestMetadata("localDeclarationsInAccessor.kt") public void testLocalDeclarationsInAccessor() throws Exception { @@ -228,6 +294,12 @@ public class OutOfContentRootFileStructureTestGenerated extends AbstractOutOfCon runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } + @Test + @TestMetadata("propertyWithSetter.kt") + public void testPropertyWithSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + @Test @TestMetadata("qualifiedCallInsideSuperCall.kt") public void testQualifiedCallInsideSuperCall() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java index 8ecf3f5623d..805e8087c6a 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/SourceFileStructureTestGenerated.java @@ -24,6 +24,12 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.(kt)$"), null, true); } + @Test + @TestMetadata("annonymousClass.kt") + public void testAnnonymousClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + @Test @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { @@ -54,6 +60,12 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); } + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + @Test @TestMetadata("classMemberProperty.kt") public void testClassMemberProperty() throws Exception { @@ -66,6 +78,12 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); } + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + @Test @TestMetadata("constructorParameterWithAnnotations.kt") public void testConstructorParameterWithAnnotations() throws Exception { @@ -96,6 +114,12 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } + @Test + @TestMetadata("enum.kt") + public void testEnum() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + @Test @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { @@ -108,6 +132,24 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } + @Test + @TestMetadata("funWithoutTypes.kt") + public void testFunWithoutTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); + } + + @Test + @TestMetadata("functionValueParameter.kt") + public void testFunctionValueParameter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); + } + + @Test + @TestMetadata("functionWithImplicitType.kt") + public void testFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + @Test @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { @@ -126,12 +168,36 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } + @Test + @TestMetadata("lambdaInImplicitFunBody.kt") + public void testLambdaInImplicitFunBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); + } + + @Test + @TestMetadata("lambdaInImplicitPropertyBody.kt") + public void testLambdaInImplicitPropertyBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); + } + + @Test + @TestMetadata("lambdasInWithBodyFunction.kt") + public void testLambdasInWithBodyFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); + } + @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); } + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + @Test @TestMetadata("localDeclarationsInAccessor.kt") public void testLocalDeclarationsInAccessor() throws Exception { @@ -228,6 +294,12 @@ public class SourceFileStructureTestGenerated extends AbstractSourceFileStructur runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } + @Test + @TestMetadata("propertyWithSetter.kt") + public void testPropertyWithSetter() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + @Test @TestMetadata("qualifiedCallInsideSuperCall.kt") public void testQualifiedCallInsideSuperCall() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/OutOfContentRootInnerDeclarationsResolvePhaseTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/OutOfContentRootInnerDeclarationsResolvePhaseTestGenerated.java index ef485a1656c..8b9eae50073 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/OutOfContentRootInnerDeclarationsResolvePhaseTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/OutOfContentRootInnerDeclarationsResolvePhaseTestGenerated.java @@ -16,89 +16,365 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("analysis/low-level-api-fir/testdata/innerDeclarationsResolve") +@TestMetadata("analysis/low-level-api-fir/testdata/fileStructure") @TestDataPath("$PROJECT_ROOT") public class OutOfContentRootInnerDeclarationsResolvePhaseTestGenerated extends AbstractOutOfContentRootInnerDeclarationsResolvePhaseTest { @Test - public void testAllFilesPresentInInnerDeclarationsResolve() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/innerDeclarationsResolve"), Pattern.compile("^(.+)\\.kt$"), null, true); + public void testAllFilesPresentInFileStructure() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.kt$"), null, true); } @Test @TestMetadata("annonymousClass.kt") public void testAnnonymousClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); } @Test @TestMetadata("class.kt") public void testClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); + } + + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + + @Test + @TestMetadata("classMemberProperty.kt") + public void testClassMemberProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); } @Test @TestMetadata("constructorParameter.kt") public void testConstructorParameter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + + @Test + @TestMetadata("constructors.kt") + public void testConstructors() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructors.kt"); + } + + @Test + @TestMetadata("danglingAnnotationClassLevel.kt") + public void testDanglingAnnotationClassLevel() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.kt"); + } + + @Test + @TestMetadata("danglingAnnotationTopLevel.kt") + public void testDanglingAnnotationTopLevel() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.kt"); + } + + @Test + @TestMetadata("declarationsInPropertyInit.kt") + public void testDeclarationsInPropertyInit() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } @Test @TestMetadata("enum.kt") public void testEnum() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + + @Test + @TestMetadata("enumClass.kt") + public void testEnumClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClass.kt"); + } + + @Test + @TestMetadata("enumClassWithBody.kt") + public void testEnumClassWithBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } @Test @TestMetadata("funWithoutTypes.kt") public void testFunWithoutTypes() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); } @Test @TestMetadata("functionValueParameter.kt") public void testFunctionValueParameter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); } @Test @TestMetadata("functionWithImplicitType.kt") public void testFunctionWithImplicitType() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + + @Test + @TestMetadata("functionalType.kt") + public void testFunctionalType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); + } + + @Test + @TestMetadata("initBlock.kt") + public void testInitBlock() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); + } + + @Test + @TestMetadata("lambda.kt") + public void testLambda() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } @Test @TestMetadata("lambdaInImplicitFunBody.kt") public void testLambdaInImplicitFunBody() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); } @Test @TestMetadata("lambdaInImplicitPropertyBody.kt") public void testLambdaInImplicitPropertyBody() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); } @Test @TestMetadata("lambdasInWithBodyFunction.kt") public void testLambdasInWithBodyFunction() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); } @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); + } + + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + + @Test + @TestMetadata("localDeclarationsInAccessor.kt") + public void testLocalDeclarationsInAccessor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + + @Test + @TestMetadata("localFun.kt") + public void testLocalFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); + } + + @Test + @TestMetadata("localFunctionWithImplicitType.kt") + public void testLocalFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + + @Test + @TestMetadata("localProperty.kt") + public void testLocalProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); + } + + @Test + @TestMetadata("localUnitFunction.kt") + public void testLocalUnitFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); + } + + @Test + @TestMetadata("memberTypeAlias.kt") + public void testMemberTypeAlias() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); + } + + @Test + @TestMetadata("multipleTopLevelClasses.kt") + public void testMultipleTopLevelClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); + } + + @Test + @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") + public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); + } + + @Test + @TestMetadata("multipleTopLevelUnitFunctions.kt") + public void testMultipleTopLevelUnitFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); + } + + @Test + @TestMetadata("nestedClases.kt") + public void testNestedClases() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); + } + + @Test + @TestMetadata("nestedClasesWithFun.kt") + public void testNestedClasesWithFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + + @Test + @TestMetadata("nestedClasses.kt") + public void testNestedClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.kt"); + } + + @Test + @TestMetadata("propertyAccessors.kt") + public void testPropertyAccessors() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } @Test @TestMetadata("propertyWithGetterAndSetter.kt") public void testPropertyWithGetterAndSetter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } @Test @TestMetadata("propertyWithSetter.kt") public void testPropertyWithSetter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + + @Test + @TestMetadata("qualifiedCallInsideSuperCall.kt") + public void testQualifiedCallInsideSuperCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); + } + + @Test + @TestMetadata("superCallAnnotation.kt") + public void testSuperCallAnnotation() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); + } + + @Test + @TestMetadata("superCallAnnotation2.kt") + public void testSuperCallAnnotation2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + + @Test + @TestMetadata("superClassCall.kt") + public void testSuperClassCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); + } + + @Test + @TestMetadata("superType.kt") + public void testSuperType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + + @Test + @TestMetadata("topLevelExpressionBodyFunWithType.kt") + public void testTopLevelExpressionBodyFunWithType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.kt"); + } + + @Test + @TestMetadata("topLevelExpressionBodyFunWithoutType.kt") + public void testTopLevelExpressionBodyFunWithoutType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.kt"); + } + + @Test + @TestMetadata("topLevelFunWithType.kt") + public void testTopLevelFunWithType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.kt"); + } + + @Test + @TestMetadata("topLevelProperty.kt") + public void testTopLevelProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt"); + } + + @Test + @TestMetadata("topLevelUnitFun.kt") + public void testTopLevelUnitFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/typeAlias.kt"); + } + + @Test + @TestMetadata("withoutName.kt") + public void testWithoutName() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt"); } } diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/SourceInnerDeclarationsResolvePhaseTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/SourceInnerDeclarationsResolvePhaseTestGenerated.java index d4d02deded2..648eb5765ac 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/SourceInnerDeclarationsResolvePhaseTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/resolve/SourceInnerDeclarationsResolvePhaseTestGenerated.java @@ -16,89 +16,365 @@ import java.util.regex.Pattern; /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.analysis.api.GenerateAnalysisApiTestsKt}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") -@TestMetadata("analysis/low-level-api-fir/testdata/innerDeclarationsResolve") +@TestMetadata("analysis/low-level-api-fir/testdata/fileStructure") @TestDataPath("$PROJECT_ROOT") public class SourceInnerDeclarationsResolvePhaseTestGenerated extends AbstractSourceInnerDeclarationsResolvePhaseTest { @Test - public void testAllFilesPresentInInnerDeclarationsResolve() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/innerDeclarationsResolve"), Pattern.compile("^(.+)\\.kt$"), null, true); + public void testAllFilesPresentInFileStructure() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/low-level-api-fir/testdata/fileStructure"), Pattern.compile("^(.+)\\.kt$"), null, true); } @Test @TestMetadata("annonymousClass.kt") public void testAnnonymousClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/annonymousClass.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/annonymousClass.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndExplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndExplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndExplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallAndImplicitConstructor.kt") + public void testCallInsideLambdaInsideSuperCallAndImplicitConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallAndImplicitConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSecondaryConstructor.kt"); + } + + @Test + @TestMetadata("callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt") + public void testCallInsideLambdaInsideSuperCallFromSingleSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/callInsideLambdaInsideSuperCallFromSingleSecondaryConstructor.kt"); } @Test @TestMetadata("class.kt") public void testClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/class.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/class.kt"); + } + + @Test + @TestMetadata("class2.kt") + public void testClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/class2.kt"); + } + + @Test + @TestMetadata("classMemberProperty.kt") + public void testClassMemberProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/classMemberProperty.kt"); } @Test @TestMetadata("constructorParameter.kt") public void testConstructorParameter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/constructorParameter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter.kt"); + } + + @Test + @TestMetadata("constructorParameter2.kt") + public void testConstructorParameter2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameter2.kt"); + } + + @Test + @TestMetadata("constructorParameterWithAnnotations.kt") + public void testConstructorParameterWithAnnotations() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructorParameterWithAnnotations.kt"); + } + + @Test + @TestMetadata("constructors.kt") + public void testConstructors() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/constructors.kt"); + } + + @Test + @TestMetadata("danglingAnnotationClassLevel.kt") + public void testDanglingAnnotationClassLevel() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationClassLevel.kt"); + } + + @Test + @TestMetadata("danglingAnnotationTopLevel.kt") + public void testDanglingAnnotationTopLevel() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/danglingAnnotationTopLevel.kt"); + } + + @Test + @TestMetadata("declarationsInPropertyInit.kt") + public void testDeclarationsInPropertyInit() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/declarationsInPropertyInit.kt"); } @Test @TestMetadata("enum.kt") public void testEnum() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/enum.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/enum.kt"); + } + + @Test + @TestMetadata("enumClass.kt") + public void testEnumClass() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClass.kt"); + } + + @Test + @TestMetadata("enumClassWithBody.kt") + public void testEnumClassWithBody() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/enumClassWithBody.kt"); } @Test @TestMetadata("funWithoutTypes.kt") public void testFunWithoutTypes() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/funWithoutTypes.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/funWithoutTypes.kt"); } @Test @TestMetadata("functionValueParameter.kt") public void testFunctionValueParameter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionValueParameter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionValueParameter.kt"); } @Test @TestMetadata("functionWithImplicitType.kt") public void testFunctionWithImplicitType() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/functionWithImplicitType.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionWithImplicitType.kt"); + } + + @Test + @TestMetadata("functionalType.kt") + public void testFunctionalType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/functionalType.kt"); + } + + @Test + @TestMetadata("initBlock.kt") + public void testInitBlock() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/initBlock.kt"); + } + + @Test + @TestMetadata("lambda.kt") + public void testLambda() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambda.kt"); } @Test @TestMetadata("lambdaInImplicitFunBody.kt") public void testLambdaInImplicitFunBody() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitFunBody.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitFunBody.kt"); } @Test @TestMetadata("lambdaInImplicitPropertyBody.kt") public void testLambdaInImplicitPropertyBody() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdaInImplicitPropertyBody.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdaInImplicitPropertyBody.kt"); } @Test @TestMetadata("lambdasInWithBodyFunction.kt") public void testLambdasInWithBodyFunction() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/lambdasInWithBodyFunction.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/lambdasInWithBodyFunction.kt"); } @Test @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/localClass.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass.kt"); + } + + @Test + @TestMetadata("localClass2.kt") + public void testLocalClass2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localClass2.kt"); + } + + @Test + @TestMetadata("localDeclarationsInAccessor.kt") + public void testLocalDeclarationsInAccessor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localDeclarationsInAccessor.kt"); + } + + @Test + @TestMetadata("localFun.kt") + public void testLocalFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFun.kt"); + } + + @Test + @TestMetadata("localFunctionWithImplicitType.kt") + public void testLocalFunctionWithImplicitType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localFunctionWithImplicitType.kt"); + } + + @Test + @TestMetadata("localProperty.kt") + public void testLocalProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localProperty.kt"); + } + + @Test + @TestMetadata("localUnitFunction.kt") + public void testLocalUnitFunction() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/localUnitFunction.kt"); + } + + @Test + @TestMetadata("memberFunctions.kt") + public void testMemberFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberFunctions.kt"); + } + + @Test + @TestMetadata("memberProperties.kt") + public void testMemberProperties() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberProperties.kt"); + } + + @Test + @TestMetadata("memberTypeAlias.kt") + public void testMemberTypeAlias() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/memberTypeAlias.kt"); + } + + @Test + @TestMetadata("multipleTopLevelClasses.kt") + public void testMultipleTopLevelClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelClasses.kt"); + } + + @Test + @TestMetadata("multipleTopLevelFunctionsWithImplicitTypes.kt") + public void testMultipleTopLevelFunctionsWithImplicitTypes() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelFunctionsWithImplicitTypes.kt"); + } + + @Test + @TestMetadata("multipleTopLevelUnitFunctions.kt") + public void testMultipleTopLevelUnitFunctions() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/multipleTopLevelUnitFunctions.kt"); + } + + @Test + @TestMetadata("nestedClases.kt") + public void testNestedClases() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClases.kt"); + } + + @Test + @TestMetadata("nestedClasesWithFun.kt") + public void testNestedClasesWithFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasesWithFun.kt"); + } + + @Test + @TestMetadata("nestedClasses.kt") + public void testNestedClasses() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/nestedClasses.kt"); + } + + @Test + @TestMetadata("propertyAccessors.kt") + public void testPropertyAccessors() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyAccessors.kt"); } @Test @TestMetadata("propertyWithGetterAndSetter.kt") public void testPropertyWithGetterAndSetter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithGetterAndSetter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithGetterAndSetter.kt"); } @Test @TestMetadata("propertyWithSetter.kt") public void testPropertyWithSetter() throws Exception { - runTest("analysis/low-level-api-fir/testdata/innerDeclarationsResolve/propertyWithSetter.kt"); + runTest("analysis/low-level-api-fir/testdata/fileStructure/propertyWithSetter.kt"); + } + + @Test + @TestMetadata("qualifiedCallInsideSuperCall.kt") + public void testQualifiedCallInsideSuperCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/qualifiedCallInsideSuperCall.kt"); + } + + @Test + @TestMetadata("secondaryConstructor.kt") + public void testSecondaryConstructor() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/secondaryConstructor.kt"); + } + + @Test + @TestMetadata("superCallAnnotation.kt") + public void testSuperCallAnnotation() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation.kt"); + } + + @Test + @TestMetadata("superCallAnnotation2.kt") + public void testSuperCallAnnotation2() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superCallAnnotation2.kt"); + } + + @Test + @TestMetadata("superClassCall.kt") + public void testSuperClassCall() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superClassCall.kt"); + } + + @Test + @TestMetadata("superType.kt") + public void testSuperType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/superType.kt"); + } + + @Test + @TestMetadata("topLevelExpressionBodyFunWithType.kt") + public void testTopLevelExpressionBodyFunWithType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithType.kt"); + } + + @Test + @TestMetadata("topLevelExpressionBodyFunWithoutType.kt") + public void testTopLevelExpressionBodyFunWithoutType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelExpressionBodyFunWithoutType.kt"); + } + + @Test + @TestMetadata("topLevelFunWithType.kt") + public void testTopLevelFunWithType() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelFunWithType.kt"); + } + + @Test + @TestMetadata("topLevelProperty.kt") + public void testTopLevelProperty() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelProperty.kt"); + } + + @Test + @TestMetadata("topLevelUnitFun.kt") + public void testTopLevelUnitFun() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/topLevelUnitFun.kt"); + } + + @Test + @TestMetadata("typeAlias.kt") + public void testTypeAlias() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/typeAlias.kt"); + } + + @Test + @TestMetadata("withoutName.kt") + public void testWithoutName() throws Exception { + runTest("analysis/low-level-api-fir/testdata/fileStructure/withoutName.kt"); } } diff --git a/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt b/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt index de7a24a0ac0..95687cd4b89 100644 --- a/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt +++ b/generators/analysis-api-generator/tests/org/jetbrains/kotlin/generators/tests/analysis/api/firLowLevel.kt @@ -103,11 +103,11 @@ internal fun TestGroupSuite.generateFirLowLevelApiTests() { } testClass { - model("innerDeclarationsResolve") + model("fileStructure", pattern = TestGeneratorUtil.KT) } testClass { - model("innerDeclarationsResolve") + model("fileStructure", pattern = TestGeneratorUtil.KT) } testClass {